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

วิธีการแปลงรายการคอลัมน์เป็นรายการที่คั่นด้วยจุลภาคใน Excel

หากคุณต้องการแปลงรายการคอลัมน์ของข้อมูลเป็นรายการที่คั่นด้วยลูกน้ำหรือตัวคั่นอื่น ๆ และแสดงผลลัพธ์ลงในเซลล์ดังที่แสดงด้านล่างคุณสามารถทำได้โดยฟังก์ชัน CONCATENATE หรือเรียกใช้ VBA ใน Excel


แปลงรายการคอลัมน์เป็นรายการที่คั่นด้วยจุลภาคด้วยฟังก์ชัน TEXTJOIN

ฟังก์ชัน Excel TEXTJOIN รวมค่าหลายค่าจากแถวคอลัมน์หรือช่วงของเซลล์ที่มีตัวคั่นเฉพาะ

โปรดทราบว่าฟังก์ชันจะพร้อมใช้งานใน Excel สำหรับ Office 365, Excel 2021 และ Excel 2019 เท่านั้น

หากต้องการแปลงรายการคอลัมน์เป็นรายการที่คั่นด้วยจุลภาค โปรดเลือกเซลล์ว่าง เช่น เซลล์ C1 แล้วพิมพ์สูตรนี้ =TEXTJOIN(", ",จริง,A1:A7) (A1: A7 คือคอลัมน์ที่คุณจะแปลงเป็นรายการหยักด้วยเครื่องหมายจุลภาค "" ระบุว่าคุณต้องการแยกรายการอย่างไร) ดูภาพหน้าจอด้านล่าง:


แปลงรายการคอลัมน์เป็นรายการที่คั่นด้วยจุลภาคด้วยฟังก์ชัน CONCATENATE

ใน Excel ฟังก์ชัน CONCATENATE สามารถแปลงรายการคอลัมน์เป็นรายการในเซลล์โดยคั่นด้วยเครื่องหมายจุลภาค โปรดปฏิบัติดังนี้

1. เลือกเซลล์ว่างที่อยู่ติดกับข้อมูลแรกของรายการเช่นเซลล์ C1 แล้วพิมพ์สูตรนี้ = CONCATENATE (TRANSPOSE (A1: A7) & ",") (A1: A7 คือคอลัมน์ที่คุณจะแปลงเป็นรายการหยักด้วยเครื่องหมายจุลภาค "," ระบุตัวคั่นที่คุณต้องการแยกรายการ) ดูภาพหน้าจอด้านล่าง:

2. ไฮไลต์ TRANSPOSE (A1: A7) & "," ในสูตรแล้วกด F9 กุญแจ

3. ถอดวงเล็บปีกกาออก {และ } จากสูตรแล้วกด เข้าสู่ กุญแจ

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

แปลงรายการคอลัมน์เป็นรายการที่คั่นด้วยจุลภาคอย่างรวดเร็วด้วย Kutools for Excel

Kutools สำหรับ Excel's รวมคอลัมน์หรือแถวโดยไม่สูญเสียข้อมูล ยูทิลิตี้สามารถช่วยให้ผู้ใช้ Excel รวมหลายคอลัมน์หรือแถวเป็นคอลัมน์ / แถวเดียวได้อย่างง่ายดายโดยไม่สูญเสียข้อมูล นอกจากนี้ผู้ใช้ Excel ยังสามารถตัดสตริงข้อความที่รวมกันเหล่านี้ด้วยการขึ้นบรรทัดใหม่หรือฮาร์ดรีเทิร์น


แปลงรายการคอลัมน์เป็นรายการที่คั่นด้วยจุลภาคด้วย VBA

หากฟังก์ชัน CONCATENATE น่าเบื่อสำหรับคุณเล็กน้อยคุณสามารถใช้ VBA เพื่อแปลงรายการคอลัมน์เป็นรายการในเซลล์ได้อย่างรวดเร็ว

1. ถือ ALT และกด F11 บนแป้นพิมพ์เพื่อเปิดไฟล์ Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่าง

2. คลิก สิ่งที่ใส่เข้าไป > โมดูลและคัดลอก VBA ลงในโมดูล

VBA: แปลงรายการคอลัมน์เป็นรายการที่คั่นด้วยจุลภาค

Sub ChangeRange()
'Updateby20140310
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)
outStr = ""
For Each rng In InputRng
    If outStr = "" Then
        outStr = rng.Value
    Else
        outStr = outStr & "," & rng.Value
    End If
Next
OutRng.Value = outStr
End Sub

3. คลิก วิ่ง หรือกด F5 เพื่อเรียกใช้ VBA

4. กล่องโต้ตอบแสดงบนหน้าจอและคุณสามารถเลือกรายการคอลัมน์ที่คุณต้องการแปลงได้ ดูภาพหน้าจอ:

5. คลิก OKจากนั้นกล่องโต้ตอบอื่นจะปรากฏขึ้นเพื่อให้คุณเลือกเซลล์ ดูภาพหน้าจอ:

6. คลิก OKและค่าทั้งหมดในรายการคอลัมน์จะถูกแปลงเป็นรายการโดยคั่นด้วยเครื่องหมายจุลภาคในเซลล์

ปลาย: ใน VBA ด้านบน "," ระบุตัวคั่นที่คุณต้องการและคุณสามารถเปลี่ยนแปลงได้ตามต้องการ


แปลงรายการคอลัมน์เป็นรายการที่คั่นด้วยจุลภาคด้วย Kutools for Excel

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

Kutools สำหรับ Excel - เพิ่มประสิทธิภาพ Excel ด้วยเครื่องมือที่จำเป็นมากกว่า 300 รายการ เพลิดเพลินกับฟีเจอร์ทดลองใช้ฟรี 30 วันโดยไม่ต้องใช้บัตรเครดิต! Get It Now

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

2. ในการเปิดกล่องโต้ตอบรวมคอลัมน์หรือแถวคุณต้อง:
(1) ตรวจสอบไฟล์ รวมแถว ตัวเลือกใน เพื่อรวมเซลล์ที่เลือกตามตัวเลือกต่อไปนี้ มาตรา;
(2) ใน ระบุตัวคั่น ตรวจสอบ ตัวคั่นอื่น ๆ ตัวเลือกและพิมพ์ลูกน้ำ , ลงในช่องต่อไปนี้

3. คลิก Ok ปุ่ม

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

Kutools สำหรับ Excel - เพิ่มประสิทธิภาพ Excel ด้วยเครื่องมือที่จำเป็นมากกว่า 300 รายการ เพลิดเพลินกับฟีเจอร์ทดลองใช้ฟรี 30 วันโดยไม่ต้องใช้บัตรเครดิต! Get It Now


Demo: แปลงรายการคอลัมน์เป็นรายการที่คั่นด้วยจุลภาคใน Excel


Kutools สำหรับ Excel: เครื่องมือแสนสะดวกกว่า 300 รายการอยู่แค่เพียงปลายนิ้วสัมผัส! เริ่มทดลองใช้ฟรี 30 วันโดยไม่มีข้อจำกัดด้านฟีเจอร์ตั้งแต่วันนี้ Download Now!

ย้อนกลับต่อกันและแปลงหนึ่งเซลล์ (รายการที่มีเครื่องหมายจุลภาค) เป็นรายการแถว / คอลัมน์ใน Excel

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



บทความญาติ:

Comments (34)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This comment was minimized by the moderator on the site
Hi Eric,
Thanks for you feedback. Since the TEXTJOIN is a rather new function, it was not there when we wrote the instruction. I will include the function in the article. Thanks so much.
Amanda
This comment was minimized by the moderator on the site
Major time saving technique - thank you!
This comment was minimized by the moderator on the site
Doesn't work, too many arguments in function.
This comment was minimized by the moderator on the site
This was a life saver! Thanks
This comment was minimized by the moderator on the site
Can someone help in converting a cell wish Value

Football, Baseball, Cricket

into


1. Football, 2. Baseball, 3. Cricket
This comment was minimized by the moderator on the site
Hi ADMINDIVISION,
You can use the Text to Columns (Excel built-in feature) or Split Cells (of Kutools for Excel) to split the cell to three columns or rows, and then apply the Insert Bullets or Numbering feature of Kutools for Excel to quickly insert numbering for the new cells/columns/rows.

Btw, there is an article introducing several solutions to inserting bullets or numberings into cells:https://www.extendoffice.com/documents/excel/950-excel-apply-bullets-numbering.html
This comment was minimized by the moderator on the site
I need to get my numbers to look like this ('1234567', '1234567') instead of ("1234567", "1234567") - any ideas!?
This comment was minimized by the moderator on the site
=SUBSTITUTE(value,CHAR(34),CHAR(39))
This comment was minimized by the moderator on the site
Hi,
There are no double quotas or quotas in the conversation results with any one of methods in this article.
This comment was minimized by the moderator on the site
Absolutely magic!Thanks!
This comment was minimized by the moderator on the site
Used This one: "Convert column list to comma separated list with VBA", worked perfect for converting rows (1000+) of email addresses into a combined list that my email client works well with. Just changed the "," to "; " and it was good to go. Thanks!
This comment was minimized by the moderator on the site
I would like to know how did you manage to copy the comma separated values from Excel Spreadsheet to Outlook/other main client. The reason being whenever I copy, the only formula gets copied but not the comma separated values. Please support.
This comment was minimized by the moderator on the site
Hi, Ravindran, you shold copy the formula result and the paste it into a cell as value firstly, then copy the pased value to other devices.
https://www.extendoffice.com/images/stories/comments/sun-comment/paste%20as%20value.png?1697765930000
This comment was minimized by the moderator on the site
Hi All, So for a few columns this formula is great, but if you were trying to figure this out on more cloumns more than 100. putting "&" is a waste of time. For me i needed sepration through "," (comma). for that, all you need to do is to separate the file in CSV, Open it on a Notepad, Copy and paste in in Word, then Copy again from Word and paste it on Excel. Hope you like to the suggested, Have a great day. Thank you, Mayank Bhargava
This comment was minimized by the moderator on the site
The VBA helped out so much! I am experiencing an issue if you try to close the pop up box or cancel it, it will show that the vba needs debugged. This also happens if the value is blank. Any ideas on how to fix this? Thanks!
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