MID

傳回字串的特定區段。

使用範本

MID("get this",5,4)

MID(A2,3,5)

語法

MID(string, starting_at, extract_length)

  • 字串 系統會從此字串擷取某個區段。

  • starting_at - The index from the left of 字串 from which to begin extracting. The first character in 字串 has the index 1.

  • 擷取長度 要擷取的區段長度。

    • If the end of 字串 is reached before 擷取長度 characters are encountered, MID returns the characters from starting_at to the end of 字串 .

附註

  • To return the contents from starting_at to the end of 字串 , use LEN to calculate the length of the string that will be returned rather than simply specifying a large number 時間範圍 擷取長度 .

  • To return the contents of 字串 beginning with a particular character or sub-string, use 次搜尋 to locate the index of the desired point.

另請參閱

SUBSTITUTE: 以新文字取代字串中的現有文字。

SPLIT: 以指定字元或字串分隔文字,並將分隔後的區段放入同一列的不同儲存格。

次搜尋: 傳回在文字中找到指定字串第一次出現的位置 (不區分大小寫)。

右邊: 傳回指定字串結尾倒數幾個字元構成的子字串。

LEFT: 傳回指定字串開頭前幾個字元構成的子字串。

LEN: 傳回字串長度。

範例

還有其他問題嗎?

嘗試以下步驟:

true
造訪學習中心

您有在公司或學校使用 Google 文件等 Google 產品嗎?快來試試實用的秘訣、教學課程和範本,瞭解如何在不安裝 Office 的情況下處理 Office 檔案、建立動態專案計劃和小組日曆、自動整理收件匣及進行其他作業。

搜尋
清除搜尋內容
關閉搜尋
Google 應用程式
主選單
12016884284258266947
true
搜尋說明中心
false
true
true
true
true
true
35
false
false
false
false