Is there a worksheet function that will return the index (or offset) of the first value in an array (row or column) that meets some criteria?
For example, suppose I have the following values in C5:Q5:
C D E F G H I J K L M N O P Q 1 1 1 1 2 1 1 3 1 1 1 1 1 1 2
I would like a formula that would give me the index (offset) of the first cell that contains a value other than "1" (<>1). In this case, that would be "5". The first value that is not a "1" is in G5, which is the 5th cell from C5.
The Match function almost works, but it requires the values to be in order (ascending or descending).
PS: I actually want it for a column of data, but a row was more compact to display.
Bookmarks