Try this workbook
In A4 (Helper Column)
In B4![]()
=IF(COUNTIF(C4:S4,0)>0,ROW()+1,"")
Drag/Fill Both Down![]()
=IF(B3=0,IF(MAX($A$4:$A4)=0,C4,INDEX($A$1:$S4,MAX($A3:$A$4),COUNT(C4:S4))),INDEX($A$1:$S4,ROW(),COUNT(C4:S4)+1))
This should give results up to Column S, extend this in all references as required
e.g.
INDEX($A$1:$S4,ROW(),COUNT(C4:S4)+1)
might become
INDEX($A$1:$X4,ROW(),COUNT(C4:X4)+1)
Hope this helps
Bookmarks