跳到主要內容

如何在Excel中將全名分為名字和姓氏?

假設您有一個名稱列表,如下面的單個列中所示,第一個屏幕快照,則需要將全名拆分為名字列,中間名列和姓氏列,如下面的屏幕快照所示。 以下是一些棘手的方法可以幫助您解決此問題:


用公式將全名拆分為名字和姓氏

將全名拆分為名字和姓氏:

您可以使用Left函數,Right函數和Find函數通過以下步驟將全名吐出為名字和姓氏:

1。 輸入公式 = LEFT(A2,FIND(“”,A2,1)-1) 在空白單元格中,在這種情況下說單元格C2,然後將填充手柄向下拖動到要填充此公式的單元格中,並且所有名字都被一次提取出來,請參見屏幕截圖:

doc拆分全名2

2。 然後輸入公式 = RIGHT(A2,LEN(A2)-FIND(“”,A2,1)) 在另一個空白單元格“單元格D2”中,將填充手柄向下拖動到要應用此公式的單元格上,所有姓氏都已提取到D列中,如以下屏幕截圖所示:

doc拆分全名3


將全名拆分為名字,中間名和姓氏:

如果要將全名分為姓,名和姓,請使用以下公式。

1。 輸入以下公式: = LEFT(A2,SEARCH(“”,A2)) 到一個空白單元格C2中,然後將填充手柄向下拖動到這些單元格以應用此公式,並且所有名字都被拆分為C列,請參見屏幕截圖:

doc拆分全名4

2。 然後輸入以下公式: = MID(A2,SEARCH(“”,A2,1)+ 1,SEARCH(“”,A2,SEARCH(“”,A2,1)+1)-SEARCH(“”,A2,1)) 到一個空白單元格D2中,然後將填充手柄向下拖動到這些單元格以應用此公式,並且所有中間名均被拆分為D列,請參見屏幕截圖:

doc拆分全名5

3。 最後,輸入以下公式: = RIGHT(A2,LEN(A2)-SEARCH(“”,A2,SEARCH(“”,A2,SEARCH(“”,A2)+1)))) 到一個空白單元格E2中,然後將填充手柄向下拖動到這些單元格以應用此公式,並且所有名字都被拆分為E列,請參見屏幕截圖:

doc拆分全名6


使用“文本到列”命令將全名拆分為名字和姓氏

記住該功能並不容易。 請不要擔心。 第二種方法將引導您輕鬆拆分全名列。

1。 選擇您將拆分的列,在這種情況下為A2:A13。

2。 點擊 文本到列 按鈕下 數據 標籤。

doc拆分全名7

3。 在 將文本轉換為列嚮導–第1步,共3步 對話框,檢查 分隔 選項,然後單擊 下一頁 按鈕。

doc拆分全名8

4。 在 第2步(共3步)嚮導,僅檢查 宇宙 在選項 定界符 部分,然後單擊 下一頁 按鈕。

doc拆分全名9

5。 在以下嚮導中,檢查 文本 在選項 列數據格式 部分,並指定 目的地 您要放置結果的單元格。 看截圖:

doc拆分全名10

6。 點擊 按鈕。 然後,您將看到全名列立即被分為名字列,中間名列和姓氏列。


使用Kutools for Excel快速,輕鬆地將全名分為姓和名

如果您對以上兩種方法感到厭倦,請在這里為您推荐一個有用的工具- Excel的Kutools,其 分割名稱 功能,您可以根據需要快速將全名拆分為名字和姓氏,也可以將全名拆分為名字,中間名和姓氏。

Excel的Kutools : 帶有300多個便捷的Excel加載項,可以在30天內免費試用. 

安裝後 Excel的Kutools,請執行以下操作:

1。 選擇要拆分的名稱範圍。

2。 點擊 庫工具 > 合併與拆分 > 分割名稱分割名稱 對話框中,指定 分割類型 如果需要,如果要將全名分為姓和名,請檢查 名字姓氏,請參見屏幕截圖:

3. 然後點擊 OK 按鈕,然後會出現另一個對話框,請在對話框中選擇要放置結果的單元格,請參見屏幕截圖:

doc拆分全名12

4。 並點擊 OK 按鈕,全名已分為名字列和姓氏列,請參見屏幕截圖:

doc拆分全名13

備註:如果您的全名包含名字,中間名和姓氏,需要分別分為三列,則只需檢查 名字, 中間名字姓氏 ,在 分割名稱 對話框,您將得到以下結果:

doc拆分全名14

立即下載和免費試用Excel的Kutools!


用逗號或其他分隔符將全名拆分為名字和姓氏:

如果您的全名在單元格中用逗號或其他分隔符分隔,Excel的Kutools' 分裂細胞 該功能還可以幫您一個忙,請參見屏幕截圖:

doc拆分全名15

Excel的Kutools:具有300多個方便的Excel加載項,可以在30天內免費試用,沒有任何限制。 立即下載並免費試用!


使用Kutools for Excel快速將全名分為姓和名

Excel的Kutools:具有300多個方便的Excel加載項,可以在30天內免費試用,沒有任何限制。 立即下載並免費試用!

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!

Comments (88)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I am able to, using Kutools, split First and Last names into two separate cells, but only on one worksheet at a time. I want to split First and Last names in same cells on 50 different worksheets within the same workbook. Is that possible? I've tried and the Kutools options for doing this become inoperable (greyed out). Please help! I don't want to have to do these one at a time. Thank you!
This comment was minimized by the moderator on the site
Hi there,

Plesae insert the below VBA code into a module in your Excel workbook:
Sub split_names()

'Update by ExtendOffice 2022/09/23

    Dim xArray As Variant
    Dim xValue As Variant
    Dim xSplit As Variant
    Dim xRg As Range
    Dim xSaveRg As Range

    With ThisWorkbook
        xArray = Array(.Sheets("Sheet1").Range("A1:A11"), .Sheets("Sheet2").Range("B1:B10"), .Sheets("Sheet3").Range("A1:A10"))
    End With

    For i = LBound(xArray, 1) To UBound(xArray, 1)
        
        Set xRg = Application.Range(xArray(i).Address(True, True, xlA1, True))
        Set xSaveRg = xRg.Offset(0, xRg.Columns.Count + 1)
        xValue = xRg.Value
        
        For b = LBound(xValue, 1) To UBound(xValue, 1)
            
            xSplit = Split(xValue(b, 1), " ")
            xSaveRg(b, 1).Value = xSplit(0)
            xSaveRg(b, 2).Value = xSplit(UBound(xSplit))
        
        Next
         
    Next
    
End Sub

Note:
1. In the 12th row of the code, you should change the sheet names and corresponding column ranges to the actual names and column ranges where full names are.
2. After inserting the code and pressing F5 to run the code, the first and last names will apprear in two columns next to the original full names column. If there are data in the output columns, make sure to move them to other columns, otherwise the data will be overwritten.
This comment was minimized by the moderator on the site
I downloaded and installed your utility, but the "Split Names" function was not on the "Text" submenu. I could not find it elsewhere. What gives?
This comment was minimized by the moderator on the site
Hello, Steven,
We have moved this feature under the Merge & Split, please view the screenshot:

Sorry for this inconvenience.
Please try, thank you!
This comment was minimized by the moderator on the site
It was incredibly helpful Thank you very much! I would never be able to figure it our on my own. All your formulas work! Marilyn
This comment was minimized by the moderator on the site
This worked perfectly! Thanks!
This comment was minimized by the moderator on the site
Works for people with 2 or 3 names. In some countries, people have 4 or more names. Creating a formula that split a FullName into FirstName, LastName and Middle Names, that's a real challenge...
This comment was minimized by the moderator on the site
thanks alot :D
This comment was minimized by the moderator on the site
Any news on a hyphenated last name, keeping them together?
This comment was minimized by the moderator on the site
Thank You - incredibly helpful
This comment was minimized by the moderator on the site
beautiful, that was a good show
This comment was minimized by the moderator on the site
Thank you, this was really helpful, and your answer to one of the questions below, about copying and pasting the values to get rid of the equation was equally helpful!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations