google-sheets-formulatextjoin

Textjoin with multiple conditions


https://docs.google.com/spreadsheets/d/1_jOn0vyv6osaoppeU9TXX1boOlZbnoCFy3eWsddP7uc/edit?usp=sharing

I am using the below formula but the result is from one condition but I need to check from multiple columns.

=TEXTJOIN(", ", TRUE, IF(($A$7=D2)+($C$7=D2)+($E$7=D2)+($G$7=D2), $B$7, "")) The above formula is working but only checking one column.

The formula must check multiple columns as mentioned in the below formula..

=TEXTJOIN(", ", TRUE, IF(($A$7=D2)+($C$7=D2)+($E$7=D2)+($G$7=D2), $B$7,$D$7,$F$7,$H$7, ""))

Please help to resolve this formula

Regards,


Solution

  • Here's another solution:

    =ARRAYFORMULA(JOIN(", ",TOCOL(IF(A7:G7=D2,B7:H7,),1)))