使用相邻的标题和行进行文本连接,带有一点变化。

huangapple go评论55阅读模式
英文:

Textjoin with adjacent headers and rows with a twist

问题

我正在尝试在行中的单元格填充时执行 Textjoin(),以获取相邻行的标题:
我有一个在不考虑空白情况下运行的公式。

期望的输出应该是:

示例期望输出:<br>
使用相邻的标题和行进行文本连接,带有一点变化。

我有一个在不考虑空白情况下运行的公式,我需要的是当出现空白单元格时,忽略相邻的标题。

英文:

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:<br>
使用相邻的标题和行进行文本连接,带有一点变化。

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(&quot; &quot;,1,FILTER($A$1:$C$1,A2:C2&lt;&gt;&quot;&quot;)&amp;&quot;:&quot;&amp;FILTER(A2:C2,A2:C2&lt;&gt;&quot;&quot;))

To make it dynamic (automatically spill result) try-

=BYROW(A2:C4,LAMBDA(x,TEXTJOIN(&quot; &quot;,1,FILTER(A1:C1,x&lt;&gt;&quot;&quot;)&amp;&quot;:&quot;&amp;FILTER(x,x&lt;&gt;&quot;&quot;))))

使用相邻的标题和行进行文本连接,带有一点变化。

答案2

得分: 0

我知道,我来晚了,但我用另一种方法来这里。。

=TEXTJOIN(" ",,IF(ISBLANK(A2:C2),"",$A$1:$C$1&":"&A2:C2))

还有

=TEXTJOIN(" ",,IF(A2:C2=0,"",$A$1:$C$1&":"&A2:C2))

英文:

I know,I was too late, but I came here with another approach..

使用相邻的标题和行进行文本连接,带有一点变化。

=TEXTJOIN(" ",,IF(ISBLANK(A2:C2),"",$A$1:$C$1&":"&A2:C2))

also

=TEXTJOIN(" ",,IF(A2:C2=0,"",$A$1:$C$1&":"&A2:C2))

huangapple
  • 本文由 发表于 2023年1月9日 13:48:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/75053584.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定