I want space between first name and last name and then comma after every full name but I'm getting output as below in Excel

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

I want space between first name and last name and then comma after every full name but I'm getting output as below in Excel

问题

我相信我理解了真正的问题:

我已经创建了两列:一个是名字的第一部分(列“A”),另一个是姓氏(列“B”)。

作者想要一个逗号分隔的名字组合列表,名字和姓氏之间用空格隔开。

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

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

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

我的Excel表格:
I want space between first name and last name and then comma after every full name but I'm getting output as below in Excel

这是问题的表格


这是问题的表格

英文:

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:
I want space between first name and last name and then comma after every full name but I'm getting output as below in Excel


This is the table for the question

答案1

得分: 2

I want space between first name and last name and then comma after every full name but I'm getting output as below in Excel

其中 & 被替换为 concatenate()...

所以只是为了展示我在评论中建议的内容有效:

I want space between first name and last name and then comma after every full name but I'm getting output as below in Excel

英文:

And with a bit of effort:

I want space between first name and last name and then comma after every full name but I'm getting output as below in Excel

Where & is replaced with concatenate()...

So just to show what I suggested in my comments works:

I want space between first name and last name and then comma after every full name but I'm getting output as below in Excel

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

发表评论

匿名网友

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

确定