vlookups and if statement

E

excelrookie

I am doing a simple vlookup, but need to search another column and if I find
a match change the lookup result.
example
vlookup(a2,tab1a2:b50,3). if A3 = 25, then I need to change the lookup value
to reflect the if statement result.
Any help would be appreciated
 
S

smartin

excelrookie said:
I am doing a simple vlookup, but need to search another column and if I find
a match change the lookup result.
example
vlookup(a2,tab1a2:b50,3). if A3 = 25, then I need to change the lookup value
to reflect the if statement result.
Any help would be appreciated

What IF statement, and what is A3?

=iF(vlookup(a2,tab1a2:b50,3)=25, [alternate lookup], [something else])

?
 
B

Bob Bridges

While you're answering smartin's very relevant questions, allow me to point
out that the sample formula you typed out for us won't work. Even assumping
an extra bang ("!"), like this:

VLOOKUP(A2,Tab1!A2:B50,3)

....the third argument says to take a value from the third column, yet you
specified only a two-column table. In my version of Excel, at least, this
returns the #REF error.

--- "smartin said:
What IF statement, and what is A3?

=iF(vlookup(a2,tab1a2:b50,3)=25, [alternate lookup], [something else])

--- excelrookie said:
I am doing a simple vlookup, but need to search another column and if I find
a match change the lookup result. example:

vlookup(a2,tab1a2:b50,3).

if A3 = 25, then I need to change the lookup value to reflect the if
statement result.
 
S

smartin

Bob said:
While you're answering smartin's very relevant questions, allow me to point
out that the sample formula you typed out for us won't work. Even assumping
an extra bang ("!"), like this:

VLOOKUP(A2,Tab1!A2:B50,3)

...the third argument says to take a value from the third column, yet you
specified only a two-column table. In my version of Excel, at least, this
returns the #REF error.

Bob, Thanks for looking over my overlooking the obvious (^:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top