#N/A error when lookup value is blank and lookup vector has a blank with VLOOKUP

Excel_VBA

New Member
Joined
Dec 19, 2009
Messages
42
I am using a VLOOKUP on a 2 column table array. Each value in column 1 has a corresponding value in column 2. However there is a case where in column1 I have a blank cell with the corresponding value for a cell that is blank cell.

When my VLOOKUP formula encounters a blank cell for the Lookup value it returns a #N/A.

In short, I want the VLOOKUP to say, when the lookup value is a blank cell, go to the table array, find the blank cell in column one and return the corresonding value in column 2 of the table array.

Is it possible to use a blank cell as a lookup value? Is this why I have the #N/A error?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
The LEN function returns 0. The CODE function returns #VALUE.
Ok, well, it's still undetermined what might be in those cells that appear blank but this tweak to my other suggested formula should work:

=IF(LEN(A1),VLOOKUP(A1,E$1:F$6,2,0),F$6)
 
Upvote 0

Forum statistics

Threads
1,224,557
Messages
6,179,507
Members
452,917
Latest member
MrsMSalt

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