跳到主要內容

如何僅在Excel中提取空格或逗號前後的文本?

當您要從列表中提取空格之前或之後的文本時,如下所示,您是否有一種很好的方法來完成它? 讓我告訴您一些技巧,僅在Excel中提取空格之前或之後的文本。


在Excel中使用公式提取空格之前或之後的文本

您可以僅使用公式快速從列表中提取空格之前的文本。

選擇一個空白單元格,然後鍵入此公式 = LEFT(A1,(FIND(“”,A1,1)-1)) (A1是要提取文本的列表的第一個單元格),然後按 Enter 按鈕。

保養竅門:
(1)如果要在逗號之前或之後提取文本,則可以更改 “”“,”.
(2)如果只想在空格後提取文本,請使用此公式 = MID(A1,FIND(“”,A1)+1,256).
(3)此方法按指定單元格中的第一個空格提取文本。 如果單元格中存在多個空格,例如“ Katty J James”,則公式為 = MID(A1,FIND(“”,A1)+1,256) 將提取第一個空格之後的所有字符。

注意絲帶 公式太難記了嗎? 將公式另存為“自動文本”條目,以供日後再次使用!
閱讀全文...     免費試用

僅將一個單元格/列中的數字(或文本)提取到不同的列/行中

Kutools for Excel增強了它的功能 分裂細胞 實用程序並支持將所有文本字符或數字從一個單元格/列中批量提取為兩列/行。


Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!


使用Kutools for Excel在空間之前或之後提取文本

如果你已經安裝 Excel的Kutools,您可以使用它 提取文字 實用程序可快速僅從列表中提取空格之前或之後的文本。

Excel的Kutools - 包含 300 多個 Excel 基本工具。 享受全功能 30 天免費試用,無需信用卡! 現在下載!

1。 選擇列表,然後單擊 庫工具 > 文本 > 提取文字。 看截圖:

2。 在彈出對話框中,鍵入 * 空間文本 框中單擊 加入 按鈕,僅在 提取清單 部分,然後單擊 Ok 按鈕。
尖端:如果只想在空格後提取文本,請鍵入 空間 並按照 *文本 此步驟中的框。

3。 在另一個彈出對話框中,請指定目標範圍的第一個單元格地址,您將輸出提取的數據,然後單擊 OK 按鈕。 到現在為止,您只能在僅提取空格之前看到文本。
     
備註:如果要在逗號之前或之後提取文本,可以鍵入 *, or ,*文本 框。


分別在空格之前和空格/逗號之後分別提取文本

Kutools for Excel支持另一種實用程序 分裂細胞 實用程序可幫助我們提取空格/逗號之前的文本和空格/逗號之後的文本,並將它們輸出到不同的單元格中。 請執行以下操作:

Excel的Kutools - 包含 300 多個 Excel 基本工具。 享受全功能 30 天免費試用,無需信用卡! 現在下載!

1。 選擇要提取的文本字符串列表,然後單擊 庫工具 > 文本 > 分裂細胞.

2。 在打開的“拆分單元格”對話框中,在 類別 部分中,檢查 分割為 部分,然後單擊 Ok 按鈕。 參見上面的截圖:
在我們的情況下,我們檢查 拆分為列 選項和 宇宙 選項,然後單擊 Ok 按鈕。 現在,文本字符串列表將根據空間分為列或行。 請參見下面的屏幕截圖:

備註:如果您需要在逗號前後提取文字,請檢查 其他 選項在第一個“拆分單元格”對話框中,然後在下面的框中鍵入逗號“,”。


演示:通過Kutools for Excel提取空格,逗號或其他分隔符之前或之後的文本


Excel的Kutools:超過 300 個方便的工具觸手可及! 立即開始 30 天免費試用,沒有任何功能限制。 現在就下載!

相關文章:

最佳辦公生產力工具

🤖 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 (32)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
thanks a lot
This comment was minimized by the moderator on the site
hello olivia john
hello olivia john david
hello olivia john robert more

Excel contains the data we need, but I'd like a value of end to appear before words like as.

john
david
more
Please provide any formula's clarification.
This comment was minimized by the moderator on the site
Hi, Nandakumar, I do not understand you problem. Do you want to extract the end word from each string or like to add the end value of the front cell before words in next cell?
This comment was minimized by the moderator on the site
hello olivia john
hello olivia john david
hello olivia john robert more

Excel contains the data we need, but I'd like a value of end to appear before words like as.

hello olivia john john
hello olivia john david david
hello olivia john robert more more

Please provide any formula's clarification.
This comment was minimized by the moderator on the site
Tried your example, I needed to read from cell D2 and read something before a space

=LEFT(D2,(FIND(" ","D2",1)-1))

and got: #VALUE!
This comment was minimized by the moderator on the site
Try with ";" instead of ","
This comment was minimized by the moderator on the site
What is the first "data" location for the sentence in row 6? ..Please answer me 🙏
This comment was minimized by the moderator on the site
Thank you!
This comment was minimized by the moderator on the site
Muchas gracias
This comment was minimized by the moderator on the site
Hello, thanks for this article, but is there a way for a mid function to work on the second space?
This comment was minimized by the moderator on the site
Hi Aland,
For example there is a sentence in the cell B3, you can extract the text after the second space from this cell with formula =MID(B3,FIND(" ",B3,FIND(" ",B3)+1),256)
This comment was minimized by the moderator on the site
Mehar Kusum Manav Maa Singh Bisht

what is formula for separate above words...
This comment was minimized by the moderator on the site
Hi Mehar singh bisht,
Do you mean split “Mehar Kusum Manav Maa Singh Bisht”, and place every word in a separate cell? You can select the cell containing the content, and click Data > Split to Column (set the delimiter as space) to split it.
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