Concatenate top row cells if column below has 1
问题 I'm looking at a large database of 1s and 0s with named columns, like this: red blue green orange purple ────── ────── ────── ────── ────── 0 0 1 0 1 0 1 0 0 0 I want to concatenate all the headings (by row) where the row has a "1" below that heading. So ideally the first one would equal "green, purple" and the second would just read "blue". I have a large amount of data so anything with nesting of a hundred "IF" functions doesn't make sense. I've tried =IF(B1:B5=1, CONCATENATE(A1:A5), "")