提示:其他語言是Google翻譯的。 你可以訪問 English 版本。
登入
x
or
x
x
註冊
x

or

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

如果您想從列表中提取文本之前或之後的文本,如下所示,是否有很好的方法來完成它? 讓我告訴你一些訣竅在Excel空間之前或之後提取文本。

在公式之前或之後用空格或逗號提取文本

用Kutools for Excel在空格或逗號之前或之後提取文本

在空格之前或空格或任何其他分隔符之前提取文本

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

Kutools for Excel增強了其功能 拆分單元格 實用程序並支持從一個單元格/列將所有文本字符或數字批量提取到兩列/行。 全功能免費試用60天!
廣告拆分單元格單獨的文本號

Office選項卡在Office中啟用選項卡式編輯和瀏覽,使您的工作更輕鬆......
Kutools for Excel - 最佳辦公生產力工具將解決您的大部分Excel問題
  • 重用任何東西: 將最常用或最複雜的公式,圖表和其他任何內容添加到您的收藏夾中,並在將來快速重複使用它們。
  • 超過20文本功能: 從文本字符串中提取數字; 提取或刪除部分文本; 將數字和貨幣轉換為英語單詞...
  • 合併工具:多個工作簿和表格合二為一; 合併多個單元格/行/列而不丟失數據; 合併重複行和總和...
  • 拆分工具:根據價值將數據拆分為多個表格; 一個工作簿到多個Excel,PDF或CSV文件; 一列到多列......
  • 粘貼跳過 隱藏/過濾行; 數和總和 按背景顏色; 創建郵件列表和 通過Cell的價值發送電子郵件...
  • 超級過濾器: 創建高級過濾方案並應用於任何工作表; 分類 按週,日,頻率等; 過濾 通過大膽,公式,評論......
  • 超過300強大的功能; 適用於Office 2007-2019和365; 支持所有語言; 在公司輕鬆部署; 全功能60天免費試用。

箭頭藍色右泡 在Excel中使用公式提取公式之前或之後的文本

只能使用公式從列表中快速提取文本之前的文本。

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

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

注意絲帶 公式太難記了? 將公式保存為自動文本條目,以便將來只需點擊一下即可重複使用!
閱讀全文... 免費試用

箭頭藍色右泡 使用Kutools for Excel在空間之前或之後提取文本

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

1。 選擇列表並點擊 Kutools > 文本 > 提取文本。 看截圖:

2。 在彈出的對話框中輸入 * - 空間文本 框中單擊 按鈕,只檢查這個新增的規則 提取列表 部分,然後單擊 Ok 按鈕。
小技巧: :如果只想在空間後提取文本,請鍵入 空間 並按照 *文本 在這一步框。

3。 在另一個彈出對話框中,請指定輸出提取數據的目標範圍的第一個單元格地址,然後單擊 OK 按鈕。 到目前為止,您只能在提取空間之前看到文本。

注意:如果要在逗號前後提取文本,可以鍵入 *, or ,*文本 框。

Kutools for Excel - 包括多個用於Excel的300便捷工具。 全功能免費試用60天,無需信用卡! 立即行動吧


箭頭藍色右泡 在空格之前和空格/逗號之後分別同時提取文本

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

1。 選擇您要從中提取的文本字符串列表,然後單擊 Kutools > 文本 > 拆分單元格.

2。 在打開的“分割單元”對話框中,指定分割類型 類型 部分,檢查中的一個拆分分隔符 拆分 部分,然後單擊 Ok 按鈕。 見上面的截圖:
在我們的例子中,我們檢查了 拆分為列 選項和 宇宙 選項,然後單擊 Ok 按鈕。 現在,文本字符串列表根據空間拆分為一列或多行。 看下面的截圖:

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


箭頭藍色右泡演示:通過Kutools for Excel在空格,逗號或其他分隔符之前或之後提取文本

在這個視頻中, Kutools - Kutools Plus 選項卡添加 Kutools for Excel。 如果需要,請點擊 60天免費試用,不受限制!

箭頭藍色右泡相關文章:


Kutools for Excel - 最佳辦公生產力工具提高80%的生產力

  • 重用: 快速插入 複雜的公式,圖表 以及你以前用過的任何東西; 加密單元格 密碼; 創建郵件列表 並發送電子郵件...
  • 超級方程式酒吧 (輕鬆編輯多行文字和公式); 閱讀佈局 (輕鬆讀取和編輯大量單元格); 粘貼到過濾範圍...
  • 合併單元格/行/列 不丟失數據; 分裂細胞含量; 組合重複的行/列...防止重複的細胞; 比較範圍...
  • 選擇複製或唯一 行; 選擇空行 (所有細胞都是空的); 超級查找和模糊查找 在許多工作簿中; 隨機選擇......
  • 精確複製 多個單元格而不更改公式參考; 自動創建參考 多張表; 插入項目符號,複選框等等......
  • 提取文本,添加文本,按位置刪除, 刪除空間; 創建和打印分頁小計; 在單元格內容和註釋之間轉換...
  • 超級過濾器 (將過濾方案保存並應用到其他工作表); 高級排序 按月/週/日,頻率等; 特殊過濾器 用粗體,斜體......
  • 結合工作簿和工作表; 根據鍵列合併表; 將數據拆分為多個表格; 批量轉換xls,xlsx和PDF...
  • 超過300強大的功能。 支持Office / Excel 2007-2019和365。 支持所有語言。 在您的企業或組織中輕鬆部署。 全功能60天免費試用。
kte tab 201905

Office選項卡為Office提供選項卡式界面,使您的工作更輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,Publisher,Access,Visio和Project。
  • 在同一窗口的新選項卡中打開並創建多個文檔,而不是在新窗口中。
  • 通過50%提高您的工作效率,每天為您減少數百次鼠標點擊!
官方底部
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Abbas Aziz · 6 months ago
    If i buy a licence then for how many days will it be valid for me?
    • To post as a guest, your comment is unpublished.
      kellytte · 4 months ago
      Hi Abbas Aziz,
      For license issues, please contact support@extendoffice.com
  • To post as a guest, your comment is unpublished.
    Atul · 2 years ago
    Hi,

    I want to know the formula which can give me the text after few characters. how to retrive that?

    can someone help with this

    Regards/-
    atul
    • To post as a guest, your comment is unpublished.
      Mahwish · 2 years ago
      Dear Atul,

      If u need exactly after certain character, (say 20 words incl space). You can go for DATA tab, Then select the column you want changes... then go to TEXT TO COLUMNS ribbon. After that a dialogue box will open and u can see Fixed width, Select it. Click next, then u will see 10, 20, 30..., click on 20 (or how many words u need after), then next. FINISH.

      CAUTION: Insert some blank columns after the required column to avoid any data loss
  • To post as a guest, your comment is unpublished.
    Tim · 2 years ago
    Hello,
    Perhaps you can help me?
    I like your information above, but as usual I have a different split column issue.
    So... I'm looking for a way to split a cell of text into to. The split must not come more that 30 characters (Including spaces) from the left but must be at a space or the immediate previous space to the 30th character point.

    So if the cell contained: "EMERGENCY MU/INITIAL FILL TO CONDENSER CTRL VAL"
    The 30th Character is the "C" of Condenser so the cell will split between "TO" and "Condenser"
    How do I write this code please?
    Many thanks for your help,
    Tim
  • To post as a guest, your comment is unpublished.
    Pappu Singh · 3 years ago
    SNJAI21470,,499,PO15135,8907617138985,Manuf

    How to extract third comma seprate value in other cell
  • To post as a guest, your comment is unpublished.
    Chad · 3 years ago
    Thank you so much!! so helpful!
  • To post as a guest, your comment is unpublished.
    Linda · 3 years ago
    I'm wanting to create a unique order number/side mark using text from different cells:

    EXAMPLE:

    Account: AB
    Contractor: Buffalo Run
    Address: 11453 Main St.

    In this example lets say everything before the colons are the column name and to the right of the colon is the data within the column. The unique ID/sidemark I want to create is using these cells. so the result is: [b]ABBR11453[/b], the break down of this ID:

    [b]AB [/b]= extracted from Cell 1 (Accounts)
    [b]BR [/b]= extracted from Cell 2 (Contractor), 1st letter of the first 2 words in this cell i.e. B for Buffalo and R for Run
    [b]11453 [/b]= extracted from Cell 3, only the numbers in the address

    I've watched tutorials and using the CONCATENATE, LEFT, MID and other functions and I'm not quite getting it. Can you PLEASE HELP!
  • To post as a guest, your comment is unpublished.
    Gus · 3 years ago
    I want to thank you, It took me over 3- 4 hours looking into different websites, help instructions and formula list, and finally you have the answer I needed. =LEFT(A1,(FIND(" ",A1,1)-1)) As quickbooks merged the part numbers with the descriptions in most of the inventory reports, I needed to build a report with vlookups and other formulas to get the inventory to show in days of stock but I was not able to extract the part number from the reports until I found your formula. Advertise it as a work around in Quickbooks reports and your website will be more popular.

    Cheers.
  • To post as a guest, your comment is unpublished.
    Trae · 3 years ago
    This was very helpful...!!!!
  • To post as a guest, your comment is unpublished.
    Starla Harrington · 4 years ago
    Hi,

    I am having trouble finding the formula for the following example I want to make a new column and have only the last name no first, middle initial, comma, or MD:

    John P. Smith, MD

    Thanks, Starla H.
  • To post as a guest, your comment is unpublished.
    Desiree · 4 years ago
    what is the purpose of the 256 at the end of the formula in the first example?
  • To post as a guest, your comment is unpublished.
    Desiree · 4 years ago
    In the first example about extracting the text after space only with the formula =MID(A1,FIND(" ",A1)+1,256). What is the purpose of the 256 in the formula?
  • To post as a guest, your comment is unpublished.
    Johann · 4 years ago
    Hello
    How can I extract text after first space to next space ?
    thank you
  • To post as a guest, your comment is unpublished.
    Sekhar · 4 years ago
    Try Trim(A1) or Clean(A1) where A1 is the cell you want to clean
  • To post as a guest, your comment is unpublished.
    Sekhar · 4 years ago
    try Trim(A1) or clean(A1)
    where A1 is the cell you want to clean spaces from
  • To post as a guest, your comment is unpublished.
    Vikram Jangir · 4 years ago
    Hi Sir
    Good Evening

    I want to know informatio about to remove space text after cell.
    kindly suggest me good formula about it.
    i have urgent need of this.

    Thanks,

    Vikram jangir