跳到主要內容

如何從單元格中的文本字符串中刪除第一個/最後一個單詞?

如果您的工作表中有一列文本字符串,並且您需要從單元格中的文本字符串中刪除第一個或最後一個單詞,如下面的屏幕快照所示。 Excel不能為您提供直接的方法,但是,通過本教程顯示的以下公式,可以立即解決此問題。

doc-刪除第一字-1

使用公式從文本字符串中刪除第一個或最後一個單詞


箭頭藍色右氣泡 使用公式從文本字符串中刪除第一個或最後一個單詞

以下公式可以幫助您從文本單元格中刪除第一個或最後一個單詞,請按照以下步驟操作:

從文本字符串中刪除第一個單詞:

1。 請在要放入結果的空白單元格中輸入以下公式: = RIGHT(A2,LEN(A2)-FIND(“”,A2)) (A2 是具有您要刪除第一個單詞的文本字符串的單元格),請參見屏幕截圖:

doc-刪除第一字-2

2。 然後將填充手柄向下拖動到要應用此公式的範圍,並且第一個單詞已從單元格中刪除,請參見屏幕截圖:

doc-刪除第一字-3

從文本字符串中刪除最後一個單詞:

要刪除單元格中的最後一個單詞,請複制並粘貼以下公式: =LEFT(TRIM(A2),FIND("~",SUBSTITUTE(A2," ","~",LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ",""))))-1),然後將填充手柄拖到要包含此公式的範圍內,所有最後的單詞都已從單元格中刪除。 看截圖:

doc-刪除第一字-4


通過特定的分隔符將單元格值拆分為多個列和行:

這款獨特的敏感免洗唇膜採用 Moisture WrapTM 技術和 Berry Mix ComplexTM 成分, Excel的Kutools分裂細胞 實用程序,您可以按空格,逗號,換行符和指定的任何其他分隔符將單元格中的文本字符串快速拆分為多列或多行。

文檔分裂細胞 1 1

Excel的Kutools:具有300多個方便的Excel加載項,可以在30天內免費試用,沒有任何限制。 立即下載並免費試用!


相關文章:

如何從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 (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