FindLast

Finds the last occurrence of:
1) a fragment in the text
2) a value in the array

Finding a fragment in the text
Description of formula:
Returns the position of a first character of a sought fragment in a given text. If searched text string appears in text more than once, the last occurrence will be found (to find the first occurrence, use Find formula).
When the fragment does not exist in the text, formula returns an error. Use IsError formula to check if the error occurred and handle this case.
The third parameter specifies the position at which to end the search. It is optional – if you do not pass it, the fragment will be sought by default in the whole text.
Syntax:
findlast(text, fragment, [end])
Parameters:
text
(type: Text) Text in which you want to find given fragment
fragment
(type: Text) Text string that you want to find
end
(type: Number) (optional parameter) Position in the text at which to end the search
Returned type:
Number
Examples:
=findlast('one two three', 'two')
=findlast('one two two three', 'two', 6)
=findlast(A1, B2)
Remarks:
Positions of characters in text are numbered from 1. Spaces counts as characters.
The formula is case sensitive.

Finding a value in the array
Description of formula:
Returns the position of a last occurrence of a sought element in a given array (to find the first occurrence, use Find formula). If the searched value does not appear in the array, formula returns an error (use IsError formula to check and handle this case).
The first parameter can be an array of values or cells range. Searched value must have the same type as elements in the array.
Syntax:
findlast(array, element)
Parameters:
array
(type: array of values of any type) The array in which to find a value
element
(type: any) The value you want to find
Returned type:
Number
Examples:
=findlast(array('one', 'two', 'three'), 'one')
=findlast(A1:A12, 'one')
=findlast(section1.A, 'one')
=findlast(section1.A, section2.A1)
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk