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), "")
and a couple things close to that, but I'm not finding an obvious way to get it. I also don't really have time or enough knowledge to deal with VBA. I appreciate all help, thanks!