我需要一个 Excel 公式将当前一列中的多个姓名分成三列。一个单元格当前包含:Jackson Hakel Brynn Holohan John Holohan
。我需要三列包含名字和姓氏的列,即:
Column1 Column 2 Column3
Jackson Hakel Brynn Holohan John Holohan.
答案1
假设/限制每个名字和姓氏之间都有一个空格,并且重复 3 个名字,并且其中没有第四个名字,请尝试以下操作。
假设您的数据在单元格 B4 中
单元格 C4
=LEFT(B4,SEARCH(" ",B4,SEARCH(" ",B4)+1)-1)
单元格 D4
=LEFT((RIGHT(B4,LEN(B4)-LEN(C4)-1)),SEARCH(" ",(RIGHT(B4,LEN(B4)-LEN(C4)-1)),SEARCH(" ",(RIGHT(B4,LEN(B4)-LEN(C4)-1)))+1)-1)
细胞E4
=RIGHT(B4,LEN(B4)-(LEN(C4)+LEN(D4)+2))
答案2
答案3
数据在A1, 在B1进入:
=TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",999)),COLUMNS($A:A)*999-998,999)) & " " & TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",999)),COLUMNS($A:B)*999-998,999))
在C1进入:
=TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",999)),COLUMNS($A:C)*999-998,999)) & " " & TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",999)),COLUMNS($A:D)*999-998,999))
以及D1进入:
=TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",999)),COLUMNS($A:E)*999-998,999)) & " " & TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",999)),COLUMNS($A:F)*999-998,999))