ไปยังเนื้อหาหลัก

วิธีแบ่งหรือแยกตัวเลขออกเป็นแต่ละหลักใน Excel

สมมติว่าคุณต้องแบ่งหรือแยกหมายเลขออกเป็นแต่ละหลักตามภาพด้านล่างนี้คุณจะทำอย่างไรเพื่อให้บรรลุ บทความนี้จะนำเสนอสองวิธีสำหรับคุณ

แบ่งหรือแยกตัวเลขออกเป็นแต่ละหลักด้วยสูตร
แบ่งหรือแยกหมายเลขออกเป็นแต่ละหลักด้วย Kutools for Excel


แบ่งหรือแยกตัวเลขออกเป็นแต่ละหลักด้วยสูตร

ส่วนนี้จะแสดงสูตรเพื่อแบ่งเซลล์ตัวเลขที่เลือกออกเป็นตัวเลขแต่ละตัวใน Excel

1. เลือกเซลล์ว่าง (พูดว่าเซลล์ C1) เพื่อค้นหาตัวเลขแบ่งตัวแรกในเซลล์ A1 จากนั้นป้อนสูตร = MID ($ A1, COLUMN () - (คอลัมน์ ($ C1) - 1), 1) ลงในแถบสูตรแล้วกด เข้าสู่ กุญแจ

หมายเหตุ: ในสูตร A1 คือเซลล์ที่มีตัวเลขที่คุณต้องแบ่งเป็นตัวเลขและ C1 คือเซลล์สำหรับค้นหาหลักแยกแรก โปรดเปลี่ยนตามที่คุณต้องการ

2. เลือกเซลล์ C1 ต่อไปจากนั้นลาก Fill Handle ไปยังเซลล์ด้านขวาจนกว่าตัวเลขทั้งหมดของเซลล์ A1 จะถูกแยกออก

3. เลือกเซลล์หลักที่แยกเหล่านี้ไว้และลาก Fill Handle ลงไปที่เซลล์จนกว่าตัวเลขทั้งหมดจะแบ่งออกเป็นตัวเลขที่แยกจากกัน ดูภาพหน้าจอ:


แบ่งหรือแยกหมายเลขออกเป็นแต่ละหลักด้วย Kutools for Excel

พื้นที่ แยกเซลล์ ประโยชน์ของ Kutools สำหรับ Excel ช่วยให้คุณสามารถแบ่งเซลล์ตัวเลขที่เลือกทั้งหมดออกเป็นตัวเลขทีละหลักได้อย่างง่ายดาย กรุณาดำเนินการดังนี้

ก่อนที่จะใช้ Kutools สำหรับ Excelโปรด ดาวน์โหลดและติดตั้งในตอนแรก.

1. เลือกเซลล์ที่มีหมายเลขที่คุณต้องการแยกเป็นหลักจากนั้นคลิก Kutools > ผสานและแยก > แยกเซลล์. ดูภาพหน้าจอ:

2 ใน แยกเซลล์ โปรดเลือก แยกเป็นคอลัมน์ ตัวเลือกใน ชนิดภาพเขียน และในส่วนระบุตัวคั่นให้เลือกระบุความกว้างและป้อนหมายเลข 1 ลงในกล่องข้อความ คลิก OK ปุ่ม

3. ในป๊อปอัพถัดไป แยกเซลล์ โปรดระบุเซลล์ว่างสำหรับค้นหาหลักแยกแรกจากนั้นคลิกที่ OK ปุ่ม

หลังจากคลิก OK ตัวเลขทั้งหมดในเซลล์ที่เลือกจะถูกแบ่งออกเป็นตัวเลขที่แยกจากกันทันทีตามภาพด้านล่างที่แสดง

  หากคุณต้องการทดลองใช้ยูทิลิตีนี้ฟรี (30 วัน) กรุณาคลิกเพื่อดาวน์โหลดแล้วไปใช้การดำเนินการตามขั้นตอนข้างต้น


แบ่งหรือแยกหมายเลขออกเป็นแต่ละหลักด้วย Kutools for Excel

สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

🤖 Kutools AI ผู้ช่วย: ปฏิวัติการวิเคราะห์ข้อมูลโดยยึดตาม: การดำเนินการที่ชาญฉลาด   |  สร้างรหัส  |  สร้างสูตรที่กำหนดเอง  |  วิเคราะห์ข้อมูลและสร้างแผนภูมิ  |  เรียกใช้ฟังก์ชัน Kutools...
คุณสมบัติยอดนิยม: ค้นหา เน้น หรือระบุรายการที่ซ้ำกัน   |  ลบแถวว่าง   |  รวมคอลัมน์หรือเซลล์โดยไม่สูญเสียข้อมูล   |   รอบโดยไม่มีสูตร ...
การค้นหาขั้นสูง: VLookup หลายเกณฑ์    VLookup หลายค่า  |   VLookup ข้ามหลายแผ่น   |   การค้นหาที่ไม่ชัดเจน ....
รายการแบบเลื่อนลงขั้นสูง: สร้างรายการแบบหล่นลงอย่างรวดเร็ว   |  รายการแบบหล่นลงขึ้นอยู่กับ   |  เลือกหลายรายการแบบหล่นลง ....
ผู้จัดการคอลัมน์: เพิ่มจำนวนคอลัมน์เฉพาะ  |  ย้ายคอลัมน์  |  สลับสถานะการมองเห็นของคอลัมน์ที่ซ่อนอยู่  |  เปรียบเทียบช่วงและคอลัมน์ ...
คุณสมบัติเด่น: กริดโฟกัส   |  มุมมองการออกแบบ   |   บาร์สูตรใหญ่    สมุดงานและตัวจัดการชีต   |  ห้องสมุดทรัพยากร (ข้อความอัตโนมัติ)   |  เลือกวันที่   |  รวมแผ่นงาน   |  เข้ารหัส/ถอดรหัสเซลล์    ส่งอีเมลตามรายการ   |  ซุปเปอร์ฟิลเตอร์   |   ตัวกรองพิเศษ (กรองตัวหนา/ตัวเอียง/ขีดทับ...) ...
ชุดเครื่องมือ 15 อันดับแรก12 ข้อความ เครื่องมือ (เพิ่มข้อความ, ลบอักขระ, ... )   |   50 + แผนภูมิ ประเภท (แผนภูมิ Gantt, ... )   |   40+ ใช้งานได้จริง สูตร (คำนวณอายุตามวันเกิด, ... )   |   19 การแทรก เครื่องมือ (ใส่ QR Code, แทรกรูปภาพจากเส้นทาง, ... )   |   12 การแปลง เครื่องมือ (ตัวเลขเป็นคำ, การแปลงสกุลเงิน, ... )   |   7 ผสานและแยก เครื่องมือ (แถวรวมขั้นสูง, แยกเซลล์, ... )   |   ... และอื่น ๆ

เพิ่มพูนทักษะ Excel ของคุณด้วย Kutools สำหรับ Excel และสัมผัสประสิทธิภาพอย่างที่ไม่เคยมีมาก่อน Kutools สำหรับ Excel เสนอคุณสมบัติขั้นสูงมากกว่า 300 รายการเพื่อเพิ่มประสิทธิภาพและประหยัดเวลา  คลิกที่นี่เพื่อรับคุณสมบัติที่คุณต้องการมากที่สุด...

รายละเอียด


แท็บ Office นำอินเทอร์เฟซแบบแท็บมาที่ Office และทำให้งานของคุณง่ายขึ้นมาก

  • เปิดใช้งานการแก้ไขและอ่านแบบแท็บใน Word, Excel, PowerPoint, ผู้จัดพิมพ์, Access, Visio และโครงการ
  • เปิดและสร้างเอกสารหลายรายการในแท็บใหม่ของหน้าต่างเดียวกันแทนที่จะเป็นในหน้าต่างใหม่
  • เพิ่มประสิทธิภาพการทำงานของคุณ 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