I have this setup in Google Sheets:
Row 1 is a list of ingredients. Rows 2-6 are specific plans that contain combinations of ingredients AF - if there is a 1 in the column, it contains the ingredient in the column.
In column H, I want to concatenate the letters in row 1 if there is a 1 underneath it. So the formula I'm looking for in Col H should spit out the following:
I've tried the TEXTJOIN formula you see in the formula bar but it's not working. Can anyone help with this?
Thanks!
Nevermind, I just figured it out. I had to change my formula above to:
=textjoin(" + ", TRUE, arrayformula(IF($B7:$G7=1, $B$1:$G$1,"")))
Anthony,
If I got it correctly what you want to combine, another option to do that is to use CONCATENATE + IF .
I needed to combine 5 columns but make a note while a cell contains particular data (eg, when X is in the cell, not to combine columns but write a comment). And the combination of CONCATENATE + IF worked.
I found this solution here .
Hope it'll be somehow helpful :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.