Reputation: 137
I want to use match function to find a value (say, value in A3) from a named range, and then use offset to give the value right of the value searched, from the named range. The named range is called "CATEGORY" I've written something like this:
=OFFSET(MATCH(CATEGORY, A3, 0)), 1, 1, 1, 1)
Its not working, how do I make it work?
Upvotes: 0
Views: 1513
Reputation: 46375
MATCH
returns a number; OFFSET
needs a range as reference.
Also, MATCH
requires a value as the first argument and a range as the second.
The following works
=OFFSET(category, MATCH(A3, category,0)-1, 1)
assuming that you are looking for the value in A3
in the column CATEGORY
Note that MATCH
returns 1
for the first cell - so you need to subtract one to stay on the same line; similarly, you need a column offset of +1
to get "cell to the right". The 0
third argument for MATCH
means "exact match".
Example of this formula at work:
Upvotes: 2