跳到主要內容

如何在Excel中將單詞或數字拆分為單獨的單元格?

作者:小陽 最後修改時間:2020-05-22

如果您在工作表中有數字或單詞的列表,現在需要按照下面的屏幕快照將單元格內容拆分為不同單元格上的字母,那麼如何在Excel中處理此工作?


箭頭藍色右氣泡 使用公式將單詞或數字拆分為單獨的單元格

使用以下簡單公式,可以快速方便地分離不同單元格上的單元格內容。

1。 在數據旁邊的空白單元格(例如C1)中,請輸入以下公式 = MID($ A1,COLUMNS($ A $ 1:A $ 1),1),請參見屏幕截圖:

doc將單詞拆分為字母2

2。 然後將填充手柄拖到右側的單元格,直到顯示空白單元格,並且單元格A1中的內容已拆分為單獨的單元格。

doc將單詞拆分為字母3

3。 然後繼續將填充手柄向下拖動到您要應用此公式的範圍,並且您可以根據需要在不同的單元格上分隔A列中的所有數據。 看截圖:

doc將單詞拆分為字母4


箭頭藍色右氣泡 使用VBA代碼將單詞或數字拆分為單獨的單元格

如果您對VBA代碼感興趣,下面的代碼也可以幫您一個忙。

1。 按住 ALT + F11 在Excel中打開鍵 Microsoft Visual Basic for Applications窗口.

2。 點擊 插入 > 模塊,然後將以下代碼粘貼到 模塊窗口.

VBA代碼:將單詞拆分為單獨的單元格

Sub SplitStuff()
'Updateby Extendoffice
Dim Rng As Range
Dim InputRng As Range, OutRng As Range
xTitleId = "KutoolsforExcel"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Range :", xTitleId, InputRng.Address, Type:=8)
Set OutRng = Application.InputBox("Out put to (single cell):", xTitleId, Type:=8)
Application.ScreenUpdating = False
For Each Rng In InputRng
    xValue = Rng.Value
    xRow = Rng.Row
    For i = 1 To VBA.Len(xValue)
        OutRng.Cells(xRow, i).Value = VBA.Mid(xValue, i, 1)
    Next
Next
Application.ScreenUpdating = True
End Sub

3。 然後按 F5 鍵來運行此代碼,並出現一個提示框,提示您選擇要使用的數據范圍,請參見屏幕截圖:

doc將單詞拆分為字母5

4. 點擊 OK,然後會彈出另一個提示框,告訴您選擇一個單元格以查找結果。

doc將單詞拆分為字母6

5。 然後點擊 OK,並且所選單元格中的單詞或數字已拆分為單個字符。 看截圖:

doc將單詞拆分為字母7


箭頭藍色右氣泡 使用Kutools for Excel將單詞或數字拆分為單獨的單元格

Excel的Kutools分裂細胞 功能是一個功能強大的工具,可以幫助您將單元格內容拆分為具有特定定界符的單獨的列或行,同時還可以將文本和數字分為兩列。

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

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

1。 選擇要拆分的單元格。

2。 然後點擊 庫工具 > 合併與拆分 > 分裂細胞,請參見屏幕截圖:

3。 在 分裂細胞 對話框,請選擇 拆分為列類別,然後檢查 指定寬度分割為 部分,然後輸入數字 1 進入文本框,這意味著將單詞按每個字符分成幾個單獨的單元格。 看截圖:

doc將單詞拆分為字母9

4。 然後點擊 Ok 按鈕,彈出另一個提示框,提醒您選擇一個單元格以輸出結果,請參見屏幕截圖:

doc將單詞拆分為字母10

5。 然後點擊 OK,所選內容中的單元格內容已拆分為單個字符。 看截圖:

doc將單詞拆分為字母11

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


箭頭藍色右氣泡 使用Kutools for Excel將單詞或數字拆分為單獨的單元格

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

箭頭藍色右氣泡 將分開的字母或數字組合成一個單詞或數字

將分開的字母或數字組合成一個單詞或數字

與上述方法相比,如果您想將這些分隔的單元格字母組合成一個單詞, Excel的Kutools's 結合 實用程序可以幫助您盡快將它們合併到一個單元格中。

doc將單詞拆分為字母12

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


相關文章:

如何從Excel中的文本字符串中提取第一個/最後一個/第n個單詞?

如何從單元格中提取每個單詞的首字母?

最佳辦公生產力工具

🤖 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 (6)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
i have an address label list with the entire label in one row. i want to divide the name from the address and city, state and zip into three rows. Is there a way to divide an address label by separating the first three words into the first line, and the second three into the second line, and the last three into the last one?
This comment was minimized by the moderator on the site
Hello friend,

How are you. You can read this article: https://www.extendoffice.com/documents/excel/3347-excel-break-address-into-parts.html. In this article, you can use the Split Cells utility of Kutools for Excel. You can choose to spilt the cell to Rows or columns. Please have a try.

Sincerely,
Mandy
This comment was minimized by the moderator on the site
I have compounds, how to split based on element symbol:
Ca(ClO4)2, --> Ca, (, Cl, O, 4, ), 2
MgSO4 --> Mg, S, O, 4
Help me.
This comment was minimized by the moderator on the site
Hello, Urip,
I'm Sorry, may be there is no direct way for solving your problem.
Anyone has a good solution, please comment here.
Thank you!
This comment was minimized by the moderator on the site
Paste your character string in any cell, say, B2.
Enter in, for example, cell D2:
=mid($B2,D$1,1)
In row 1, starting in column D, number cells incrementally and horizontally from 1 -> N where N is the number of characters in your string; D2 contains 1, E2 contains 2, etc.
Pull formula from D2 to N2.
This comment was minimized by the moderator on the site
Thank you for this! It worked and saved me so much time to do it manually!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations