"If" statement with Vlookup

N

Nikki

I have three columns that I need to lookup and if the first column is met
then " " for the other two columns. If first column is null then lookup
column B and if B is null lookup column C. A result should show up for only 1
column. I am having difficulty writing the formula without getting errors.
Please help.
 
M

Max

Indicatively it should look like this:
=if(isna(vlook1),if(isna(vlook2),if(isna(vlook3),"",vlook3),vlook2),vlook1)

Here are 2 actual examples, all in one cell (shown indented for clarity):

If you mean lookup the same value (A3) in 3 different sheets:
Sheet2, Sheet3 & Sheet4 (in this sequence):

=IF(ISNA(VLOOKUP(A3,Sheet2!A:B,2,0)),
IF(ISNA(VLOOKUP(A3,Sheet3!A:B,2,0)),
IF(ISNA(VLOOKUP(A3,Sheet4!A:B,2,0)),"",
VLOOKUP(A3,Sheet4!A:B,2,0)),
VLOOKUP(A3,Sheet3!A:B,2,0)),
VLOOKUP(A3,Sheet2!A:B,2,0))


If you mean lookup 3 different values (A3,B3,C3 - in this sequence) in the
same sheet (Sheet2):

=IF(ISNA(VLOOKUP(A3,Sheet2!A:B,2,0)),
IF(ISNA(VLOOKUP(B3,Sheet2!A:B,2,0)),
IF(ISNA(VLOOKUP(C3,Sheet2!A:B,2,0)),"",
VLOOKUP(C3,Sheet2!A:B,2,0)),
VLOOKUP(B3,Sheet2!A:B,2,0)),
VLOOKUP(A3,Sheet2!A:B,2,0))

p/s: For unmatched instances, I'd use blanks: ""
as the return, rather than a space: " "

Above any good? hit the YES below
 
D

Daryl S

Nikki -

You didn't give us much information to go on. I assume you have 3 columns
with data, columns A, B, and C. I also assume you have a value you are
trying to lookup, say it is in cell E2. When you say column A is null, I
assume you mean that the value in cell E2 is not in you data in column A,
etc. If this is the case, then your formula will be something like this (you
will need to change the row numbers to match your ranges):

=IF(ISNA(VLOOKUP(E2,A4:A11,1,FALSE)),IF(ISNA(VLOOKUP(E2,B4:B11,1,FALSE)),IF(ISNA(VLOOKUP(E2,C4:C11,1,FALSE)),"Not
Found",VLOOKUP(E2,C4:C11,1,FALSE)),VLOOKUP(E2,B4:B11,1,FALSE)),VLOOKUP(E2,A4:A11,1,FALSE))
 

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

Similar Threads


Top