This is probably a realy easy one for you guys but
I have a row of data - if a cell contains a text string that is found within a specified named range I want to return the row number - is this possible?
This is probably a realy easy one for you guys but
I have a row of data - if a cell contains a text string that is found within a specified named range I want to return the row number - is this possible?
Hi,
Do you mean the relative or absolute row number? For example, if, in the the range A6:A20, cell A9 met your criteria, would you want 4 or 9 to be returned?
Perhaps you could post a workbook with an example and your desired result clearly outlined.
Regards
Quickly - the 9 would be the result I wanted
I can post an extracct from the book if needed
Thanks.
And by "contains a text string" do you mean that the entire contents of the cell match one of the values in the Named Range, or just that some part of it does?
For example, if your Named Range consists of 3 entries: "cat", "dog" and "mouse", would a cell containing "123cat456" be a valid match according to your criteria? Or must a cell contain precisely either "cat", "dog" or "mouse" for it to be considered a match?
Regards
a valid match would have to be an exact match to the contents of teh named range
=LOOKUP(2,1/(ISNUMBER(MATCH(A6:A20,Range1,0))),ROW(A6:A20))
where Range1 is the Named Range in question, assumed to be either a single-row or single-column vector (and not, for example, a 2-dimensional grid).
You don't say which row number should be preferred if there is more than one such match: this formula will return the last.
Regards
Brillian - Thanks
You're welcome!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks