跳到主要內容

如何從Excel中的字符串中提取除第一個/最後一個字符以外的所有字符?

在Excel中,對於大多數Excel用戶而言,提取前n個或後n個字符可能很容易,但是如果要提取除第一個或最後一個字符之外的所有字符,您將如何解決? 在這裡,我介紹了一些在Excel中快速提取除冷杉/最後一個字符以外的所有字符的方法。

使用公式從字符串中提取除前/後n個字符外的所有字符

使用Kutools for Excel從字符串中提取除前/後n個字符外的所有字符


箭頭藍色右氣泡 使用公式從字符串中提取除前/後n個字符外的所有字符

從字符串中提取除第一個字符外的所有字符

選擇一個空白單元格並鍵入此公式 = MID(A1,2,LEN(A1)) (A1是要從中提取除第一個字符以外的所有字符的單元格,數字2是要從其開始提取的字符的順序,在這種情況下,我將提取除第一個字符以外的所有字符,因此從第二個字符中提取字符) , 按 Enter 按鈕並填寫所需的範圍。 查看結果屏幕截圖:

從字符串中提取除最後一個字符外的所有字符

選擇一個空白單元格並鍵入此公式 =左(A1,LEN(A1)-1) (A1是您要提取除最後一個字符以外的所有字符的單元格,數字1是您不想從字符串的右邊提取的數字),按 Enter 按鈕並填寫所需的範圍。 查看結果屏幕截圖:


箭頭藍色右氣泡 使用Kutools for Excel從字符串中提取除前/後n個字符外的所有字符

如果你有 Excel的Kutools 安裝在您的計算機上,您可以使用 按位置刪除 此功能可提取Microsoft Excel中除前n個或後n個字符以外的所有字符。

Excel的Kutools 包括300多個便捷的Excel工具。 30天免費試用,不受限制。 立即獲取

1.選擇要提取的範圍單元格,然後單擊 庫工具 > 文本工具 > 按位置刪除。 看截圖:

2。 在裡面 按位置刪除 對話框中,指定您不想從字符串中提取的數字 民數記 文本框,然後選中 從左起。 看截圖:

3。 點擊 Ok or 登記,則從每個字符串中刪除前n個字符。

如果要提取除最後n個字符外的所有字符,請檢查 從右邊 步驟2中的複選框。

尖端:應用此功能會更改您的原始數據,最好先複製它們。

單擊此處以獲取有關按位置刪除的更多信息。


相關文章:

最佳辦公生產力工具

🤖 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 (6)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
LOVE IT!!!! thanks you so much.
Really, really helpful.
This comment was minimized by the moderator on the site
Buenísimo, muchas gracias por compartirlo!!!
This comment was minimized by the moderator on the site
Thank you. This really helped me.
This comment was minimized by the moderator on the site
i want to extract the first 2 digits and last 2 digits from the word Belconnen and add the number 35 at the end..what is the formula?
This comment was minimized by the moderator on the site
Very thankful for the post. I was trying few hours with different kind of formulas when finally I found this post and resolved in seconds. And this Kutools is great tool but still no free version unfortunately.
This comment was minimized by the moderator on the site
I want to extract all but the first word from a cell. I can extract the first word but I want the First word in one column and the rest of the string to appear in another column without the extracted word in it. Any help would be great! Thanks, Rick
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations