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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi Aladin (or anyone else who'd like to help)

I've found an odd occurance with your formula. For some reason, its not picking up on results in row 64. I've tried to reverse the order of the rows, putting 68 first and then counting back to 64, but then results for row 68 don't show. Any idea why or how I could correct this?

Thanks,
 
Upvote 0
Hi Aladin (or anyone else who'd like to help)

I've found an odd occurance with your formula. For some reason, its not picking up on results in row 64. I've tried to reverse the order of the rows, putting 68 first and then counting back to 64, but then results for row 68 don't show. Any idea why or how I could correct this?

Thanks,

Care to post the formula as you implemented it?
 
Upvote 0
hi Aladin,

Here you go:

=IF(A19="","",LOOKUP(REPT("z",255),VLOOKUP(A19,'c:\xyz'!$F$3:$CG$6472,{64,65,66,67,68},0)))
 
Upvote 0
hi Aladin,

Here you go:

=IF(A19="","",LOOKUP(REPT("z",255),VLOOKUP(A19,'c:\xyz'!$F$3:$CG$6472,{64,65,66,67,68},0)))

Looks ok.

The formula picks out the last text value which obtains from columns 64, 65, 66, 67, and 68. Suppose we have:

{"Jad",0,"Kad","Vad","Qad"}

we'll get Qad.

If you would rather want Jad, let's reverse the column numbers...

=IF(A19="","",LOOKUP(REPT("z",255),VLOOKUP(A19,'c:\xyz'!$F$3:$CG$6472,{68,67,66,65,64},0)))

Does this help?
 
Upvote 0
hi Aladin,

Yes I figured that's what your code did. I'm wondering if its just a problem with the source excel document or our network rather than the code, since it seems to work perfectly on some instances and in others it does not. Thanks very much!
 
Upvote 0
hi Aladin,

Yes I figured that's what your code did. I'm wondering if its just a problem with the source excel document or our network rather than the code, since it seems to work perfectly on some instances and in others it does not. Thanks very much!

What is the full path to the table?
 
Upvote 0

Forum statistics

Threads
1,225,223
Messages
6,183,666
Members
453,179
Latest member
mstav

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