You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: FIND returns start_num - 1 instead of #VALUE! when text is not found and start_num > 1 #1883
FIND(find_text, within_text, start_num) returns a number when find_text does not occur at or after start_num. It should return #VALUE!. With start_num = 1 the error is returned as expected.
So a formula like =IFERROR(FIND("-", A1, 3), 0) gets a wrong position instead of the fallback. SEARCH returns #VALUE! as expected.
Cause: TextPlugin.find computes shiftedText.indexOf(pattern) + startIndex and only checks index > 0, so a miss (-1) becomes startIndex - 1, which is positive whenever startIndex > 1.
Activity