1

是否可以SUM在一列中对连续值进行分组,而无需像我在这张图片中那样手动将它们一个一个地分组?

在此处输入图像描述

样品表

4

1 回答 1

1
=ARRAYFORMULA(SUBSTITUTE(TRANSPOSE(SPLIT(CONCATENATE({"♥"&MMULT(
 SPLIT(TRANSPOSE(SPLIT(TEXTJOIN(" ", 1, IF(INDIRECT("A2:A"&MAX(IF(A2:A<>"", 
 ROW(A2:A), )))="", "♦", A2:A)), "♦")), " ")*1, ROW(INDIRECT("A1:A"&COLUMNS(
 SPLIT(TRANSPOSE(SPLIT(TEXTJOIN(" ", 1, IF(INDIRECT("A2:A"&MAX(IF(A2:A<>"", 
 ROW(A2:A), )))="", "♦", A2:A)), "♦")), " ")*1)))^0),IF(
 SPLIT(TRANSPOSE(SPLIT(TEXTJOIN(" ", 1, IF(INDIRECT("A2:A"&MAX(IF(A2:A<>"", 
 ROW(A2:A), )))="", "♦", A2:A)), "♦")), " ")<>"", "♥♠", )}), "♥")), "♠", ))

0

于 2019-09-11T22:02:45.867 回答