MATCH

傳回與指定值相符的項目在範圍中的相對位置。

使用範本

MATCH("Sunday",A2:A9,0)

MATCH(DATE(2012,1,1),A2:F2)

語法

MATCH(search_key, range, search_type)

  • search_key 要尋找的值,舉例來說, -42 , , or I24.

  • 範圍 要搜尋的一維陣列。

    • If a range with both height and width greater than 1 is used, MATCH will return 無法使用.
  • 搜尋類型 - [ OPTIONAL - 1 by default ] - The manner in which to search.

    • 1, the default, causes MATCH to assume that the range is sorted in ascending order and return the largest value less than or equal to search_key.

    • 0 indicates exact match, and is required in situations where 範圍 is not sorted.

    • -1慈善事業MATCH to assume that the range is sorted in descending order and return the smallest value greater than or equal to search_key.

附註

  • MATCH returns the position in an array or range of a matched value rather than the value itself. To return the value itself or another value corresponding to the row or column the match is found in, use INDEX, HLOOKUP, or VLOOKUP.

另請參閱

VLOOKUP: 垂直查詢。縱向搜尋特定範圍中的第一欄是否有指定準則,並將找到的資料列中指定儲存格的值傳回。

HLOOKUP: 水平查詢。橫向搜尋特定範圍中的第一列是否有指定準則,並將找到的資料欄中指定儲存格的值傳回。

INDEX: 傳回以列偏移和欄偏移方式指定的儲存格內容。

範例

Returns the relative position of an item in an array that matches a specified value based on differnet 搜尋類型 .

true
造訪學習中心

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

搜尋
清除搜尋內容
關閉搜尋
主選單
6311776952743254727
true
搜尋說明中心
true
true
true
true
true
35
false
false