I have a dataset in which the right 5 columns indicate with a Y/N if each row applies to that option of 5 potential options:
I am looking to add one final column that uses a formula to check for each of the five options if it applies, and then produces a comma-separated list of which apply
E.g.
Row 1 [Y,N,N,Y,N] > output "Option 1,Option 4"
Row 2 [Y,Y,Y,N,N] > output "Option 1, Option 2, Option 3"
Or, a formula for the yellow cells in this image:
I've tried various forms of array formulae but can't get it going...
=TEXTJOIN(", ",TRUE,IF(A2:E2="Y",A$1:E$1,""))
or=TEXTJOIN(", ",TRUE,FILTER(A$1:E$1,A2:E2="Y"))
would work if you adjust the referenced ranges to fit your data.