If vlookup is blank in one column, then vlookup in another column

Groovicles

Board Regular
Joined
Nov 27, 2013
Messages
52
Hi everyone,

I have the following formula:

=IF(ISNA(VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,64,FALSE)),"",(VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,65,FALSE)))

So what I'm trying to do, is that vlookup to column 64 is blank, then do a vlookup on column 65. The formula is not working. Its only reading one column, but if its blank its not reading the next, its only showing a blank result. Any ideas?

Thanks everyone!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
ISNA() is looking for #N/A
which means the vlookup will not find a lookup value and NOT that it finds the lookup but returns a Blank
so you need

=IF(VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,64,FALSE))="",(VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,65,FALSE)),VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,64,FALSE))

but you would also need some error handling as well- see if that at least works and is what you meant

SO if column 64 is not a blank - it will use the Vlookup for column 64
 
Upvote 0
Hi etaf,

Thanks so much for the reply. Unfortunately I'm getting a formula error. I think it might just be how the brackets are set, but I can't seem to figure out the correct one. I get no error when I remove one bracket from ))="" and add a third bracket right at the end, but then i don't get the right result. Any ideas?

Thanks again!
 
Upvote 0
try

=IF(VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,64,FALSE)="",VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,65,FALSE),VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,64,FALSE))

that does assume you are not getting a #N/A error
in which case

=IFERROR(IF(VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,64,FALSE)="",VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,65,FALSE),VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,64,FALSE)),"")
 
Upvote 0
Hi etaf,

Thanks for reply. I'm not getting an error message, but the result is coming up blank which means its not reading next cell over. Column 65 has a result which should be displayed since column 64 is blank. Any thoughts?
 
Upvote 0
is it blank or space - it maybe a null

try this
=VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,64,FALSE)=""

do you get a TRUE or a FALSE ?
 
Upvote 0
so that means that its not a blank - it maybe a NULL
but what does
=VLOOKUP(A9,'c:xyz'!$F$3:$CG$6472,64,FALSE)
return
 
Upvote 0
Oh my god, there's a **** space in the cell and nothing else. No wonder it was returning a blank. Good call, etaf.
 
Upvote 0
glad you found the reason - are all blanks actually spaces
 
Upvote 0

Forum statistics

Threads
1,225,159
Messages
6,183,256
Members
453,152
Latest member
ChrisMd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top