Mabe this will get the ball rolling
Using two helper columns (A:B), these can be hidden.
In A4
In A5![]()
=ROW()
Drag/Fill Down until the last row of your tables plus two more rows.![]()
=IF(C4="",ROW(),"")
In B4
Drag/Fill Down as above.![]()
=IF(A4="","",IF(MIN(A5:$A$1000)>0,MIN(A5:$A$1000)-2,MIN(A5:$A$1000)))
Then in D4
Drag/Fill Down![]()
=IF(C4="","",COUNTIF(INDIRECT("C"&MAX($A$4:$A4)&":C"&MAX($B$4:$B4)),C4))
Can you get what you need from that?
Bookmarks