Home > Enterprise >  Textjoin with adjacent headers and rows with a twist
Textjoin with adjacent headers and rows with a twist

Time:01-09

I'm trying to perform a Textjoin() when the cell is filled in a row to get the adjacent row header: I have a formula that works without looking at the blanks.

The desired output would be:

example desired output:
enter image description here

I have a formula that works without looking at the blanks, what I need is when there is a blank cell the adjacent header is ignored.

CodePudding user response:

Try the following formula-

=TEXTJOIN(" ",1,FILTER($A$1:$C$1,A2:C2<>"")&":"&FILTER(A2:C2,A2:C2<>""))

To make it dynamic (automatically spill result) try-

=BYROW(A2:C4,LAMBDA(x,TEXTJOIN(" ",1,FILTER(A1:C1,x<>"")&":"&FILTER(x,x<>""))))

enter image description here

  • Related