V look up help please - ignore blank cells

jedibrown

Board Regular
Joined
Oct 17, 2011
Messages
136
Hi,

My current formula is:

=VLOOKUP($G$3:$G$6000,$Q$3:$R$14,2,FALSE)

Please could somebody tell me how I get it to ignore blanks and not come up with #N/A?

Thanks
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
The first parameter in your VLOOKUP should be the value you are searching for not a range.

Post an example file and perhaps we can solve it for you
 
Upvote 0
Hi,

My current formula is:

=VLOOKUP($G$3:$G$6000,$Q$3:$R$14,2,FALSE)

Please could somebody tell me how I get it to ignore blanks and not come up with #N/A?

Thanks

On Excel 2007 or later...

If a text result is expected, copy down:
Code:
[FONT=Lucida Console]=IF($G3="","",IFERROR(T(VLOOKUP($G3,$Q$3:$R$14,2,0)),""))[/FONT]

If a numeric result is expected, copy down:
Code:
[FONT=Lucida Console]=IF($G3="","",IFERROR(VLOOKUP($G3,$Q$3:$R$14,2,0),""))[/FONT]

Otherwise...

If a text result is expected, copy down:
Code:
[FONT=Lucida Console]=IF($G3="","",LOOKUP(REPT("z",255),CHOOSE({1,2},"",[/FONT]
[FONT=Lucida Console]  VLOOKUP($G3,$Q$3:$R$14,2,0))))[/FONT]

If a numeric result is expected, copy down:
Code:
[FONT=Lucida Console]=IF($G3="","",LOOKUP(9.99999999999999E+307,CHOOSE({1,2},0,[/FONT]
[FONT=Lucida Console]  VLOOKUP($G3,$Q$3:$R$14,2,0))))[/FONT]
 
Upvote 0
Hi,

I have tried this for another part but everything stays blank.

=IF(A4="","",LOOKUP(REPT("z",255),CHOOSE({1,2},"",VLOOKUP(A4,Sheet2!A4:M4000,11,FALSE))))

Can anyone help please?

Thanks :)
 
Upvote 0
I have also tried this one:

=IF(A5="","",IFERROR(T(VLOOKUP(A5,Sheet2!A5:M4001,11,FALSE)),""))

The same thing happens - It worked perfectly before for the other one.

Thanks
 
Upvote 0
Hi,

I have tried this for another part but everything stays blank.

=IF(A4="","",LOOKUP(REPT("z",255),CHOOSE({1,2},"",VLOOKUP(A4,Sheet2!A4:M4000,11,FALSE))))

Can anyone help please?

Thanks :)

I have also tried this one:

=IF(A5="","",IFERROR(T(VLOOKUP(A5,Sheet2!A5:M4001,11,FALSE)),""))

The same thing happens - It worked perfectly before for the other one.

Thanks

You probably need to make the ranges absolute (lock)...

=IF($A4="","",LOOKUP(REPT("z",255),CHOOSE({1,2},"",VLOOKUP($A4,Sheet2!$A$4:$M$4000,11,0))))

=IF($A4="","",IFERROR(T(VLOOKUP($A4,Sheet2!$A$4:$M$4000,11,0)),""))

Note that these formulas expect the VLOOKUP bit return a text value when successful. By the way, 0 does the same as FALSE here.
 
Upvote 0
Hi - I simply used =if(a4="","",VLOOKUP(A4,Sheet2!A4:M4000,11,FALSE)

Seems to be working perfectly - Thanks again for all of your help :)
 
Upvote 0

Forum statistics

Threads
1,216,106
Messages
6,128,863
Members
449,473
Latest member
soumyahalder4

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