在文字字串中尋找指定子字串,回傳第一個符合字元的起始位置(從 1 起算)。區分大小寫、不支援通用字元。
FIND(find_text, within_text, [start_num])
find_text:要尋找的文字。within_text:被搜尋的母字串。start_num:起始搜尋位置(預設 1)。FIND("A", "apple") → #VALUE!;FIND("a", "apple") → 1。* ? 通用字元。start_num 可跳過前綴:FIND("Y", "AYF0093.Young", 8) → 9。find_text 為空字串 → 回傳 1。| 情況 | 結果 |
|---|---|
| 找不到 | #VALUE! |
| start_num ≤ 0 | #VALUE! |
| start_num > within_text 長度 | #VALUE! |