I agree that helpers are certainly worthwhile here - you could (pending possibility of interspersed blanks etc) use single cell arrays but they would be complex & inefficient.
If you don't have to worry about interspersed blanks (ie every entry has a number and Test Max always exceeds 0) then in single cell array terms:
A23:
=SUM(IF(ISNA(MATCH(ROW($A$2:$A$18),ROUND(MOD(SMALL($A$2:$A$18*MAX($B$2:$B$18)/$B$2:$B$18+ROW($A$2:$A$18)/1000000,{1,2,3}),1)*1000000,0),0)),A$2:A$18))
confirmed with CTRL + SHIFT + ENTER (enter alone will not suffice)
copied to B23
Bookmarks