-2

Got a list of data with 7 columns each with a Y in, I want to add a formula that will check for a Y in the column then concatenate the headings if correct and ignore if not.

See below example

enter image description here

Is this possible?

Ries
  • 35
  • 3

2 Answers2

1

Try this User Defined Function.

=TextJoinIfs(", ", 0, 0, B$1:H$1, B2:H2, "y")

enter image description here

0

I did not get the TextJoinIfs to work, sadly, looks neat. If you have the same problem maybe this can be a solution. Not pretty I know...

=TEXTJOIN(",",TRUE,IF(IFERROR(MATCH("Y",A2),FALSE),"col 1",""),IF(IFERROR(MATCH("Y",B2),FALSE),"col 2",""),IF(IFERROR(MATCH("Y",C2),FALSE),"col 3",""),IF(IFERROR(MATCH("Y",D2),FALSE),"col 4",""),IF(IFERROR(MATCH("Y",E2),FALSE),"col 5",""),IF(IFERROR(MATCH("Y",F2),FALSE),"col 6",""),IF(IFERROR(MATCH("Y",G2),FALSE),"col 7",""),)

enter image description here

W_O_L_F
  • 1,049
  • 1
  • 9
  • 16