Google-sheets – Get an item value from a column item concatenated

concatenategoogle sheets

How do I achieve a specific result concatenated with commas (ACT1, ACT2) from a filtered text ("Not delivered") and referenced from the position of the columns:

WA103237 example

Best Answer

Assuming the coloured row is Row1, please try in G2 and copied down to suit:

=regexreplace(if(C2="Not delivered",C$1&", ","")&if(D2="Not delivered",D$1&", ","")&if(E2="Not delivered",E$1&", ","")&if(F2="Not delivered",F$1&", ",""),",\s\z","")