Based on the example:
First: don't use merged cells... in the case of D3, remove the merge area, highlight D3:E3 and use Centre Across Selection option.
Second:
The above could be applied to each of your examples.![]()
D3: =SUM(C4:F15)+IF(C43<6,SUMPRODUCT(((MOD(B16:B27-1,6)+1)>(MOD(INDEX(B4:B15,MATCH(TRUE,INDEX(ISNUMBER(C4:C15),0),0))-1,6)+1))*C16:E27))
Bookmarks