Excel的TEXTJOIN给我输出错误。

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

Excel textjoin give me wrong output

问题

我相信我理解了真正的问题:我已经创建了两列:一列是名字(列“A”),另一列是姓氏(列“B”)。
作者想要一个由名字和姓氏组合而成的逗号分隔列表,其中两个名字之间用空格分隔。

为了实现这一点,可以创建一个辅助列,其中包含以下公式:=TEXTJOIN(" ",,A2:B2)

最终列表可以使用以下公式创建:=TEXTJOIN(", ",,C2:C6)(参见单元格“E2”)

...真正的问题是如何消除那个辅助列:以下公式由于明显的原因无法完成任务:=TEXTJOIN(", ",,TEXTJOIN(" ",,A2:B6))(参见单元格“E3”)

我的Excel表格:
Excel的TEXTJOIN给我输出错误。

我已经发布了预期输出的屏幕截图。

英文:

I believe I understand the real question here:
I have created two columns: one with the first name (column "A") and one with the last name (column "B").
The author wants a comma-separated list of the combinations of first and last names, where both names are separated by a space.

In order to do this, a helper column can be created, containing following formula: =TEXTJOIN(" ",,A2:B2)

The final list can be created, using the following formula: =TEXTJOIN(", ",,C2:C6) (see cell "E2")

... the real problem is how to eliminate that helper column: the following formula does not to the job, for obvious reasons: =TEXTJOIN(", ",,TEXTJOIN(" ",,A2:B6)) (see cell "E3")

My Excel sheet:
Excel的TEXTJOIN给我输出错误。

I have posted the screenshot of expected output

答案1

得分: 1

你需要两个TEXTJOIN()函数,然后求和。尝试以下公式,并根据叙述文本进行调整。

="There are 5 emp... " & TEXTJOIN(", ", 1, BYROW(A2:B6, LAMBDA(x, TEXTJOIN(" ", 1, x)))) & " and their salary is: " & SUM(C2:C6)

或者使用连接运算符:

="There are 5 emp... " & TEXTJOIN(", ", 1, A2:A6 & " " & B2:B6) & " and their salary is: " & SUM(C2:C6)

Excel的TEXTJOIN给我输出错误。

英文:

You need two TEXTJOIN() then sum. Try the following formula and make adjustment for narration texts.

="There are 5 emp... " & TEXTJOIN(", ",1, BYROW(A2:B6,LAMBDA(x,TEXTJOIN(" ",1,x)))) & " and their salary is: " & SUM(C2:C6)

Or using concatenate operator,

="There are 5 emp... " & TEXTJOIN(", ",1, A2:A6& " " &B2:B6) & " and their salary is: " & SUM(C2:C6)

Excel的TEXTJOIN给我输出错误。

huangapple
  • 本文由 发表于 2023年7月17日 18:08:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/76703405.html
匿名

发表评论

匿名网友

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

确定