Vlookup '0' and ''

meridius10

New Member
Joined
Apr 30, 2011
Messages
47
I have set up a vlookup table which feeds off lists in another worksheet. The vlookup formula is in the main table.

Prior to any additions the vlookup would enter a blank cell as "" (i.e.blank), however, after making additional entries the new additions are being reported as 0 (zero) in cells which do not (purposefully) include a variable.

I can't understand why this has happened and would prefer to have blank cells in those that have no variable.

The vlookup formulas are:

=VLOOKUP($D7,VLookupList1,2,FALSE)
=VLOOKUP($D7,VLookupList1,3,FALSE)
=VLOOKUP($D7,VLookupList1,4,FALSE)
=VLOOKUP($D7,VLookupList1,5,FALSE)

Any ideas?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I have set up a vlookup table which feeds off lists in another worksheet. The vlookup formula is in the main table.

Prior to any additions the vlookup would enter a blank cell as "" (i.e.blank), however, after making additional entries the new additions are being reported as 0 (zero) in cells which do not (purposefully) include a variable.

I can't understand why this has happened and would prefer to have blank cells in those that have no variable.

The vlookup formulas are:

=VLOOKUP($D7,VLookupList1,2,FALSE)
=VLOOKUP($D7,VLookupList1,3,FALSE)
=VLOOKUP($D7,VLookupList1,4,FALSE)
=VLOOKUP($D7,VLookupList1,5,FALSE)

Any ideas?
If the data type of the value being returned is TEXT then try this...

=T(VLOOKUP($D7,VLookupList1,2,0))

If the data type is numeric or variable then use this version...

=IF(VLOOKUP($D7,VLookupList1,2,0)="","",VLOOKUP($D7,VLookupList1,2,0))
 
Upvote 0
by default vlookup converts blanks to zeros (unless the source data had user-generated blanks in them), like there was a formula like if (a then "" else b), or thru VBA, etc.

you can change blanks with ="", and then paste special as values. or you can change your vlookup - = if (vlookup=0,"",vlookup)
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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