ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   VLookup Null values (https://www.excelbanter.com/excel-worksheet-functions/90333-vlookup-null-values.html)

Babylooch

VLookup Null values
 
I am looking up values in a Pivot Table. If the value is null, the formula
is displaying zero instead of null. Is there a way to display null when null
and zero when the value is zero?

Dave Peterson

VLookup Null values
 
=if(vlookup(...)="","",vlookup(...))



Babylooch wrote:

I am looking up values in a Pivot Table. If the value is null, the formula
is displaying zero instead of null. Is there a way to display null when null
and zero when the value is zero?


--

Dave Peterson

Babylooch

VLookup Null values
 
Dave,

Thank you. I thought I tried that, but I guess not. If the "If" statement
is true (=""), why doesn't the vlookup display what it looked up ("")? Why
do you need to do an IF clause to display what is in the cell anyhow? Just
wondering.

Val


"Dave Peterson" wrote:

=if(vlookup(...)="","",vlookup(...))



Babylooch wrote:

I am looking up values in a Pivot Table. If the value is null, the formula
is displaying zero instead of null. Is there a way to display null when null
and zero when the value is zero?


--

Dave Peterson


Dave Peterson

VLookup Null values
 
Try this in a test worksheet:

Put this formula in A2:
=A1

Notice that it returns a 0. That's just the way excel works.

If you want to avoid this problem, you need to do something like:
=if(a1="","",a1)

Same thing with =vlookup()'s.



Babylooch wrote:

Dave,

Thank you. I thought I tried that, but I guess not. If the "If" statement
is true (=""), why doesn't the vlookup display what it looked up ("")? Why
do you need to do an IF clause to display what is in the cell anyhow? Just
wondering.

Val

"Dave Peterson" wrote:

=if(vlookup(...)="","",vlookup(...))



Babylooch wrote:

I am looking up values in a Pivot Table. If the value is null, the formula
is displaying zero instead of null. Is there a way to display null when null
and zero when the value is zero?


--

Dave Peterson


--

Dave Peterson

Arun

VLookup Null values
 
Try changing the format to Custom ;;""
That tells Excel to display zero's as "".

"Babylooch" wrote:

I am looking up values in a Pivot Table. If the value is null, the formula
is displaying zero instead of null. Is there a way to display null when null
and zero when the value is zero?



All times are GMT +1. The time now is 02:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com