The FIND function finds the specified instance of the search string in the source string and returns its position. If the search string is not found, then the function returns a zero.
The FIND function has the following format:
FIND(source_string, search_string[, not_case_sensitive][, n])
The FIND function accepts the following parameters:
source_string (string)
search_string (string)
not_case_sensitive (Boolean)
(Optional) Specifies case sensitivity. If the not_case_sensitive flag is omitted or set to FALSE, the function searches the source string for an exact match. If the not_case_sensitive flag is set to TRUE, the FIND function ignores case.
n (number)
(Optional) Specifies the instance of the search string in the source string. If n is set to zero or one or omitted, the function finds the first instance of the search string. Otherwise, the function finds the nth instance of the search string. If n is negative, the function begins the search at the end of the source string.
The FIND function returns a number.
Return_value=FIND('PhoebePhoebe', 'oe', FALSE, 1)
Return_value=3
Return_value=FIND('PhoebePhoebe', 'OE', FALSE, 1)
Return_value=0
Return_value=FIND('PhoebePhoebe', 'OE', TRUE, 1)
Return_value=3
Return_value=FIND('PhoebePhoebe', 'oe', FALSE, -1)
Return_value=9
Return_value=FIND('PhoebePhoebe', 'OE', FALSE, -1)
Return_value=0
Return_value=FIND('PhoebePhoebe', 'OE', TRUE, -1)
Return_value=9
Return_value=FIND('PhoebePhoebe', 'oe', FALSE, 2)
Return_value=9
Return_value=FIND('PhoebePhoebe', 'OE', FALSE, 2)
Return_value=0
Return_value=FIND('PhoebePhoebe', 'OE', TRUE, 2)
Return_value=9
Copyright © 2010 CA. All rights reserved. | Email CA about this topic |