英文:
Textjoin with adjacent headers and rows with a twist
问题
我正在尝试在行中的单元格填充时执行 Textjoin()
,以获取相邻行的标题:
我有一个在不考虑空白情况下运行的公式。
期望的输出应该是:
我有一个在不考虑空白情况下运行的公式,我需要的是当出现空白单元格时,忽略相邻的标题。
英文:
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:
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.
答案1
得分: 2
=TEXTJOIN(" ",1,FILTER($A$1:$C$1,A2:C2<>"")&":"&FILTER(A2:C2,A2:C2<>""))
=BYROW(A2:C4,LAMBDA(x,TEXTJOIN(" ",1,FILTER(A1:C1,x<>"")&":"&FILTER(x,x<>""))))
英文:
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<>""))))
答案2
得分: 0
我知道,我来晚了,但我用另一种方法来这里。。
=TEXTJOIN(" ",,IF(ISBLANK(A2:C2),"",$A$1:$C$1&":"&A2:C2))
还有
=TEXTJOIN(" ",,IF(A2:C2=0,"",$A$1:$C$1&":"&A2:C2))
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论