跳到主要內容

如何在Excel中將數字分解或拆分為單個數字?

假設您需要將數字分解或分解為單個數字,如下面的屏幕截圖所示,您可以怎麼做? 本文將為您提供兩種方法。

用公式將數字分解或拆分為單個數字
使用Kutools for Excel將數字分解或拆分為單個數字


用公式將數字分解或拆分為單個數字

本節將顯示一個公式,用於將選定的數字單元格拆分為Excel中的單個數字。

1.選擇一個空白單元格(例如單元格C1)以查找單元格A1中數字的第一個拆分數字,然後輸入公式 = MID($ A1,COLUMN()-(COLUMN($ C1)-1),1) 進入編輯欄,然後按 Enter 鍵。

備註:在公式中,A1是您需要拆分為數字的單元格,而C1是用於查找第一個拆分數字的單元格。 請根據需要更改它們。

2.繼續選擇單元格C1,然後將“填充手柄”拖動到右邊的單元格,直到單元格A1的所有數字都被拆分出來。

3.保持選中這些拆分數字單元格,然後將“填充手柄”向下拖動到這些單元格,直到將所有數字拆分為單獨的數字。 看截圖:


使用Kutools for Excel將數字分解或拆分為單個數字

分裂細胞 的效用 Excel的Kutools 幫助您輕鬆地一次將所有選定的數字單元格拆分成單個數字。 請執行以下操作。

申請前 Excel的Kutools首先下載並安裝.

1.選擇您需要拆分為數字的單元格,然後單擊 庫工具 > 合併與拆分 > 分裂細胞。 看截圖:

2。 在裡面 分裂細胞 對話框,請選擇 拆分為列 在選項 類別 部分,然後在“指定分隔符”部分中,選擇“指定寬度”,然後在文本框中輸入數字1。 點擊 OK 按鈕。

3.在接下來彈出 分裂細胞 對話框中,請指定一個空白單元格以查找第一個拆分數字,然後單擊 OK 按鈕。

點擊後 OK 按鈕,所選單元格中的所有數字將立即拆分為單獨的數字,如下圖所示。

  如果您想免費試用(30天)此實用程序, 請點擊下載,然後按照上述步驟進行操作。


使用Kutools for Excel將數字分解或拆分為單個數字

最佳辦公生產力工具

🤖 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 (13)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello, I am wondering if it is possible to decompose into numbers with the same values. For example, divide 40 into 5 cells of 8.
This comment was minimized by the moderator on the site
Hi

I would like to get assistance with the following:

One cell the numbers are [1,1,1,2,2,3,4,1]

I would like to let this number only result in another cell to illustrate [1,2,3,4]

This would also mean if there is a 0, for instance, [1,1,0,1,4,2]
Then I would like it to look like = [1,2,4]

Kind regards
SS
This comment was minimized by the moderator on the site
Hi Stefan S,
Please apply the following user-defined function to solve this problem.
1. After adding the following code into the Module (Code) window.
2. Go back to the worksheet, select a cell, enter this formula =RemoveDupes2(A1) and press the Enter key to get the result.
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/digits.png
Function RemoveDupes2(txt As String, Optional delim As String = ",") As String
    Dim x
    Dim arr()
    'Updateby Extendoffice 20221128
    Application.Volatile
    On Error Resume Next
    With CreateObject("Scripting.Dictionary")
        .CompareMode = vbTextCompare
        For Each x In Split(txt, delim)
            If Trim(x) <> "" And Not .Exists(Trim(x)) Then .Add Trim(x), Nothing
        Next
        If .Exists("0") Then .Remove ("0")
        If .Count > 0 Then
            xCount = .Count
            ReDim arr(1 To xCount)
            i = 1
            For Each Key In .Keys
                arr(i) = Key
                i = i + 1
            Next

            For i = 1 To xCount - 1
                For j = i + 1 To xCount
                If arr(i) > arr(j) Then
                        temp = arr(i)
                        arr(i) = arr(j)
                        arr(j) = temp
                    End If
                Next j
            Next i

            RemoveDupes2 = Join(arr, delim)
        End If
    End With
End Function
This comment was minimized by the moderator on the site
Dear Crystal

Thank you for your comment. It works great! You are a star!

Kind regards
SS
This comment was minimized by the moderator on the site
Is there a way for the Split Numbers formula to work on a cell receiving changing data, so that the split numbers automatically update when the source cell changes?
This comment was minimized by the moderator on the site
9310B82214332A this no want to spilt in next column in this format 82214332A what to do
This comment was minimized by the moderator on the site
Dear Sir,


bill no bill Date Party Name Item Name Acutal Quantity
01 01-04-2019 abc mobile 20


ISKO TWENTIES ROW ME LANA HAI



KINDLY MADAD KIJIYE VERY VERY IMPORTANT
This comment was minimized by the moderator on the site
Final Text: BEARING, BALL; TYPE: DEEP GROOVE, CAGE MATERIAL: STEEL, ROW QUANTITY: SINGLE, INSIDE DIAMETER: 30 MM, OUTSIDE DIAMETER: 72 MM, WIDTH: 19 MM, CLOSURE TYPE: SINGLE SHIELDED, LOAD CAPACITY: DYNAMIC: 29.6, STATIC: 16 KN, SPEED: 13000 RPM; MANUFACTURER PART NO 63 63 6306 Z SKF

I want to find the "63 6306 Z SKF" within the final text, Can anyone guide me
This comment was minimized by the moderator on the site
Hi Jagan,
The final text you shown above locate in one cell? or would you please provide a screenshot of your example showing what you are exactly trying to do?
This comment was minimized by the moderator on the site
if data is in below format what will do?
DDD 1 2 3 4 5 6 7 8 9 10 11 12 13 14
1,2,3,5,15,12,11
12,10,13,11,5,2,4
1,5,7,4


Need number from 1st cell to below heading number(i.e. if we have 1,5,11 then answer put in cell below 1,5,11)
This comment was minimized by the moderator on the site
Option Explicit
'Main Function
Function NumberToText(ByVal MyNumber)
Dim Count
Dim Result
Dim NLength
Count = 1
NLength = Len(MyNumber) + 1
Do While Count < NLength
Result = Result & GetDigit(Mid(MyNumber, Count, Count)) & Space(1)
Count = Count + 1
Loop
NumberToText = Result
End Function

Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = "Zero"
End Select
End Function


I am trying to convert digits into words for preparing mark sheet purpose. Eg: 63 => Six Three but this is not working with 3 digit number Eg:798 =>Seven Zero Eight ERROR. Please Help
This comment was minimized by the moderator on the site
Dear Priya,
The following User-defined function can help you.

Function NumberToText(ByVal xNum)
Dim I As Long
Dim xTemp As Long
Dim xStr As String
Dim Result As String
For I = 1 To Len(xNum)
xTemp = Mid(xNum, I, 1)
Select Case xTemp
Case 1: xStr = "One"
Case 2: xStr = "Two"
Case 3: xStr = "Three"
Case 4: xStr = "Four"
Case 5: xStr = "Five"
Case 6: xStr = "Six"
Case 7: xStr = "Seven"
Case 8: xStr = "Eight"
Case 9: xStr = "Nine"
Case Else: xStr = "Zero"
End Select
Result = Result & xStr & Space(1)
Next
NumberToText = Result
End Function
This comment was minimized by the moderator on the site
Hi, Advise me the formula for multi digit number combine to single digit exp: 12345 (inside one cell) autocalculate to 1+2+3+4+5 = 6
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations