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

จะลบคำแรก / คำสุดท้ายออกจากสตริงข้อความในเซลล์ได้อย่างไร

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

doc-remove-คำแรก-1

ลบคำแรกหรือคำสุดท้ายออกจากสตริงข้อความด้วยสูตร


ลูกศรสีฟ้าฟองขวา ลบคำแรกหรือคำสุดท้ายออกจากสตริงข้อความด้วยสูตร

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

ลบคำแรกออกจากสตริงข้อความ:

1. โปรดป้อนสูตรนี้ลงในเซลล์ว่างที่คุณต้องการใส่ผลลัพธ์: = ขวา (A2, LEN (A2) -FIND ("", A2)) (A2 คือเซลล์ที่มีสตริงข้อความที่คุณต้องการลบคำแรก) ดูภาพหน้าจอ:

doc-remove-คำแรก-2

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

doc-remove-คำแรก-3

ลบคำสุดท้ายออกจากสตริงข้อความ:

หากต้องการลบคำสุดท้ายออกจากเซลล์โปรดคัดลอกและวางสูตรนี้: =LEFT(TRIM(A2),FIND("~",SUBSTITUTE(A2," ","~",LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ",""))))-1)จากนั้นลากจุดจับเติมไปยังช่วงที่คุณต้องการให้มีสูตรนี้และคำสุดท้ายทั้งหมดจะถูกลบออกจากเซลล์ ดูภาพหน้าจอ:

doc-remove-คำแรก-4


แยกค่าของเซลล์ออกเป็นหลายคอลัมน์และแถวโดยใช้ตัวคั่นเฉพาะ:

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

doc- แยกเซลล์ -1 1

Kutools สำหรับ Excel: ด้วย Add-in ของ Excel ที่มีประโยชน์มากกว่า 300 รายการให้ทดลองใช้ฟรีโดยไม่มีข้อ จำกัด ใน 30 วัน ดาวน์โหลดและทดลองใช้ฟรีทันที!


บทความที่เกี่ยวข้อง:

วิธีลบอักขระตัวแรกตัวสุดท้ายหรือตัวอักษรบางตัวออกจากข้อความใน 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 (17)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you so much!!
This comment was minimized by the moderator on the site
You're amazing!!
This comment was minimized by the moderator on the site
Hey, please assist me.



i have this: FPJCRTXCB540AS_CRG116



How do i keep the word before underscore, but remove the word after underscore?



tested and change to relevant cell but it shows "#value!". i just want it to be like this: FPJCRTXCB540AS
This comment was minimized by the moderator on the site
Hello,
To remove all text after the underscore, please apply the following formula:
=LEFT(A1, FIND("_", A1&"_")-1)

Please try, hope it can help you!
This comment was minimized by the moderator on the site
Hey, please assist me.

i have this: FPJCRTXCB540AS_CRG116

How do i keep the word before underscore, but remove the word after underscore?

tested and change to relevant cell but it shows "#value!". i just want it to be like this: FPJCRTXCB540AS
This comment was minimized by the moderator on the site
Thank you so much for sharing the formula, very helpful!
This comment was minimized by the moderator on the site
Retention Payable - Tooba Aluminium & Glass Works. L.L.C

I want to remove (retention payable - ) from the above sentence

what I will do I want to save my time
This comment was minimized by the moderator on the site
Just do find and replace if you just want to remove the same word from the sheet
saves time
This comment was minimized by the moderator on the site
Hello, Muhammad,
To solve your problem, please apply the following formula:

=MID(A1,1+FIND("~",SUBSTITUTE(A1," ","~",3)),255)

Please try it, hope it can help you!
This comment was minimized by the moderator on the site
I have two strings, one works fine removing the last word (the file size) but one does not (I think due to double space in the string.)

=LEFT(TRIM(A2),FIND("~",SUBSTITUTE(A2," ","~",LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ",""))))-1)

Cell A2 contents: D:\Sowdeswari\BIO-LAB-DSM-03\03-Jan-2019\Config\SecEvent.Evt 01/01/2019 5963776
Result: D:\Sowdeswari\BIO-LAB-DSM-03\03-Jan-2019\Config\SecEvent.Evt 01/01/2019 (This is correct)

Cell A2 contents: D:\laptop_swap\win_account\Desktop\ !!!Docs\FORM-00538.pdf 18/01/2018 298032
Result: D:\laptop_swap\win_account\Desktop\ !!!Docs\FORM-00538.pdf (this is not correct, but works when I remove one of the spaces before the "!!!" in the string)

All help appreciated. It's a large file and there are a few errors but if I can fix this I can probably work out the other ones.
This comment was minimized by the moderator on the site
Wow, thank you, worked perfectly and saved a lot of time.
This comment was minimized by the moderator on the site
hello
may i ask you how to separate using formula the 4-digit numbers?
1234 · Bike:5678 · Tires Improvement; :6767
This comment was minimized by the moderator on the site
AMINODDIN MAMONDIONG/HASSANA AMPUAN <<--- i want to separate this two names damn! let me try
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