Eagels E2=IF($D2=0,"",$C2)
After that I made an pivot table.
I16 on sheet ex
=IF(RIGHT(SUBSTITUTE(SUBSTITUTE(TEXTJOIN(",",TRUE,B16:E16),"0,",""),0,""),1)=",",LEFT(SUBSTITUTE(SUBSTITUTE(TEXTJOIN(",",TRUE,B16:E16),"0,",""),0,""),LEN(SUBSTITUTE(SUBSTITUTE(TEXTJOIN(",",TRUE,B16:E16),"0,",""),0,""))-1),SUBSTITUTE(SUBSTITUTE(TEXTJOIN(",",TRUE,B16:E16),"0,",""),0,""))
See the attached file.
The yellows cells are the helpcolumns so you can (easier) understand the above formula.
In green the result.
After posting the file, I read you have Excel 2016. In that version maybe textjoin is not available, so you could not use this solution.
Bookmarks