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

วิธีแยกข้อความก่อน / หลังช่องว่างที่สองหรือลูกน้ำใน Excel 

ใน Excel ฟังก์ชัน Text To Columns อาจช่วยให้คุณแยกแต่ละข้อความจากเซลล์หนึ่งไปยังเซลล์ที่แยกจากกันตามช่องว่างเครื่องหมายจุลภาคหรือตัวคั่นอื่น ๆ แต่คุณเคยพยายามแยกข้อความก่อนหรือหลังช่องว่างที่สองหรือลูกน้ำจากเซลล์หรือไม่ ใน Excel ตามภาพหน้าจอต่อไปนี้? บทความนี้ฉันจะพูดถึงวิธีการบางอย่างในการจัดการกับงานนี้

สารสกัด doc ก่อนช่องว่างที่สอง 1

แยกข้อความก่อนช่องว่างที่สองหรือลูกน้ำด้วยสูตร

แยกข้อความหลังช่องว่างที่สองหรือลูกน้ำด้วยสูตร


ลูกศรสีฟ้าฟองขวา แยกข้อความก่อนช่องว่างที่สองหรือลูกน้ำด้วยสูตร

หากต้องการรับข้อความก่อนช่องว่างที่สองโปรดใช้สูตรต่อไปนี้:

ใส่สูตรนี้: = IF (ISERROR (FIND ("", A2, FIND ("", A2,1) +1)), A2, LEFT (A2, FIND ("", A2, FIND ("", A2,1) +1 ))) ลงในเซลล์ว่างที่คุณต้องการค้นหาผลลัพธ์ C2ตัวอย่างเช่นจากนั้นลากที่จับเติมลงไปที่เซลล์ที่คุณต้องการให้มีสูตรนี้และข้อความทั้งหมดก่อนที่ช่องว่างที่สองจะถูกแยกออกจากแต่ละเซลล์ดูภาพหน้าจอ:

สารสกัด doc ก่อนช่องว่างที่สอง 2

หมายเหตุ: หากคุณต้องการแยกข้อความก่อนเครื่องหมายจุลภาคที่สองหรือตัวคั่นอื่น ๆ โปรดแทนที่ช่องว่างในสูตรด้วยลูกน้ำหรือตัวคั่นอื่น ๆ ตามที่คุณต้องการ เช่น: =IF(ISERROR(FIND(",",A2,FIND(",",A2,1)+1)),A2,LEFT(A2,FIND(",",A2,FIND(",",A2,1)+1))).


ลูกศรสีฟ้าฟองขวา แยกข้อความหลังช่องว่างที่สองหรือลูกน้ำด้วยสูตร

หากต้องการส่งคืนข้อความหลังช่องว่างที่สองสูตรต่อไปนี้สามารถช่วยคุณได้

โปรดป้อนสูตรนี้: = MID (A2, FIND ("", A2, FIND ("", A2) +1) +1,256) ลงในเซลล์ว่างเพื่อค้นหาผลลัพธ์จากนั้นลากที่จับเติมลงไปที่เซลล์เพื่อเติมสูตรนี้และข้อความทั้งหมดหลังจากแยกช่องว่างที่สองพร้อมกันโปรดดูภาพหน้าจอ:

สารสกัด doc ก่อนช่องว่างที่สอง 3

หมายเหตุ หากคุณต้องการแยกข้อความหลังเครื่องหมายจุลภาคตัวที่สองหรือตัวคั่นอื่น ๆ คุณเพียงแค่แทนที่ช่องว่างด้วยลูกน้ำหรือตัวคั่นอื่น ๆ ในสูตรตามที่คุณต้องการ เช่น: = MID (A2, FIND (",", A2, FIND (",", A2) +1) +1,256).

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

🤖 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 (28)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, I want to extract each values after underscore. How do I do that. I am familiar with delimiter, but want to learn the formula to do that.

Brush_25mm_Orange_Skid_110cm
Polish_25mm_Orange_Toast_100cm
Car_25mm_White_Tyre_120cm
Paint_25mm_Red_Reflective_95cm
This comment was minimized by the moderator on the site
Edit - I see this was already addressed by Dave - thank you sir! skyyang can you please edit the incorrect solution to "Extract Text Before The Second Delimiter" with the correct equation logic?
This comment was minimized by the moderator on the site
Hello There

I have a scenario in 4 types as below in a excel chart

Type 1 : FX01865-CWB-22F
Type 2 : CD30250-AJX-2D-AB
Type 3 : DF10250-MUR-JH-B
Type 4 : YZ00250-MDS-4T-BHR

To all cases, I want to extract only the BOLD TEXT as an answer in the adjacent cells

Please help share formula

ThanksSaran

This comment was minimized by the moderator on the site
I have the text like this
LAXMI RANI DELHI DELHI CG012054567IN CA
so, I want the text to be arranged in excel like this
LAXMI RANI(1st cell ) DELHI(2nd cell) DELHI (3rd cell) CG012054567IN (4th cell) CA(5th cell)
This comment was minimized by the moderator on the site
Hi, rangaih,To deal with your problem, first, you can split your cell values based on space by using the Text to Columns feature, after spliting the text strings, you just need to combine the fisrt two cell values as you need.Please try, thank you!
This comment was minimized by the moderator on the site
Hi, I have a long string in a single cell and want to extract all the information after each Product ID. Product ID: 686, Product Qty: 1, Product SKU: RUB 100, Product Name: Emu Oil Rub 100g, Product Weight: 0.2000, Product Variation Details: |Product ID: 691, Product Qty: 1, Product SKU: MOIST 100, Product Name: Emu Oil Moisturiser 100g, Product Weight: 0.1900, Product Variation Details: , |Product ID: 705, Product Qty: 3, Product SKU: WASH 250, Product Name: Natural Hand & Body Wash with Emu Oil 250ml, Product Weight: 0.4000, Product Variation Details: I need the quantity in one cell and the product name in another cell for each of the products after Product ID. Can you help?
This comment was minimized by the moderator on the site
In my scenario There are three “-“ and sometimes one “-“
before second “-“ text should be enter
if in cell only one “-“ it should be blank

e.g As-01-14-32 answers like thisAs-01

e.g As-01 answer Blank cell

what will be farmula?
This comment was minimized by the moderator on the site
Hello, Bil,
To solve your problem, please apply the below formula:
=IFERROR(LEFT(A1,FIND("#",SUBSTITUTE(A1,"-","#",2))-1),"")
Please try it, thank you!
This comment was minimized by the moderator on the site
Hi
I need help if i want to extract anything after first comma and before last comma.
"Flat 135 Nevendon Road, Sally,Wickford, SS12 0NL"

Column A = Flat 135 Nevendon Road
Column B = Sally,Wickford
Columns C = SS12 0NL
This comment was minimized by the moderator on the site
Hello, Jayaswal,
To solve your porblem, please apply the following formulas:
First part--Cell B1: =LEFT(A1,FIND(",",A1,1)-1)
Second part--Cell C1: =MID(A1,FIND(",",A1)+1,LOOKUP(1,0/(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)=","),ROW(INDIRECT("1:"&LEN(A1))))-FIND(",",A1)-1)
Third part--Cell D1: =MID(A1,FIND("=",SUBSTITUTE(A1,",","=",LEN(A1)-LEN(SUBSTITUTE(A1,",",""))))+1,256)

Pleasr try, hope it can help you!
This comment was minimized by the moderator on the site
It’s working, thanks
This comment was minimized by the moderator on the site
One more thing
after third”-“all text should remain even 1 or 10 otherwise blank
e.g A-01-12-As answer As
e.g A-01-12-Asty answer Asty
e.g A-01 answer blank
This comment was minimized by the moderator on the site
Hi,
May be the below formula can solve your task, please try:
=IFERROR(TRIM(MID(A1,FIND("#",SUBSTITUTE(A1,"-","#",3))+1,255)),"")
This comment was minimized by the moderator on the site
Fine thanks
This comment was minimized by the moderator on the site
How can I extract Text 1 and Text 2 from a string like Text 1_Text 2_Text 3_Text 4
This comment was minimized by the moderator on the site
how do I do this from right to left. Basically, want to extract last two words.
This comment was minimized by the moderator on the site
Hi, demo,
To extract and return the last two words from text strings, please apply the below formula:
=IF((LEN(A1)-LEN(SUBSTITUTE(A1," ","")))<2,A1,RIGHT(A1,LEN(A1)-FIND("/",SUBSTITUTE(A1," ","/",(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1)))))

Please try, hope it can help you!
This comment was minimized by the moderator on the site
THANK YOU!!!
This comment was minimized by the moderator on the site
Is there a way to extract various pieces of this string? 123ABC.01.02.03.04 ---- for example, to pull the 123ABC, and then in the next column pull 123ABC.01, and then 123ABC.01.02, then 123ABC.01.02.03, and so on.
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