Forum Discussion
Bogie27
Aug 10, 2021Copper Contributor
Concatenating arguments with the IF function
I'm using MS Excel 2016 (part of Office Professional Plus 2016) I have following spreadsheet. ID plan1 plan2 plan3 plan4 plan5 plan6 Result 12345 BH1 DoNothing BH3 DoNothing Do...
- Aug 10, 2021
Detlef_Lewin Thank you so much Detlef. This worked perfectly. I wasn't aware of the TEXTJOIN function and didn't see it with all of my web searches. I'll keep it handy.
Detlef_Lewin
Aug 10, 2021Silver Contributor
- HalloWorldOct 05, 2024Copper Contributor
This answer gives you the chance to change the second "B2:G2" to another row and check against empty cells. I changed it to the header row to join all of the headings as soon as the cell was not empty: `=TEXTJOIN(";",TRUE,IF(B2:G2<>"",B$1:G$1,""))`. You need to execute it with `Ctrl+Shift+Enter`.
- Bogie27Aug 10, 2021Copper Contributor
Detlef_Lewin Thank you so much Detlef. This worked perfectly. I wasn't aware of the TEXTJOIN function and didn't see it with all of my web searches. I'll keep it handy.