Thanks for posting the workbook...
In that workbook
• Insert a blank row under Row_1
(otherwise the formula gets confused. It's looking for number ranges between blank rows)
• put this list in S1:T5
Next, put this ARRAY FORMULA, completed by holding down CTRL and SHIFT when you press ENTER (instead of just pressing ENTER) in Row_2 of whatever column you need it in:
=IF((D2<>"")*(D3=""),TEXT(SUM(IF((D2<>"")*(D3=""),OFFSET(C2:D2,-(ROW()-LOOKUP(10^10,ROW(D$1:D2)/((D$2:D2<>"")*(D$1:D1="")))-1),,(ROW()
-LOOKUP(10^10,ROW(D$1:D2)/((D$2:D2<>"")*(D$1:D1=""))))),0)*10^IF((D2<>"")*(D3=""),OFFSET($S$6:$T$6,-(ROW()
-LOOKUP(10^10,ROW(D$1:D2)/((D$2:D2<>"")*(D$1:D1="")))-1),,(ROW()-LOOKUP(10^10,ROW(D$1:D2)
/((D$2:D2<>"")*(D$1:D1=""))))),0)),REPT("0",2*(ROW()
-LOOKUP(10^10,ROW(D$1:D2)/((D$2:D2<>"")*(D$1:D1="")))))),"")
Last, Copy that cell
Paste into the cell BELOW it and down as far as you need.
for your data, these will be the results for each group:
0012
0110
0011
0011
0210
0010
0112
1001
0100
0100
00000000
000000
010202
000000
Helping, yet?
Bookmarks