• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Vlookup Blanks as blanks not 0

Rlopez24

New Member
I am doing a Vlookup and it is returning 0 if there is a blank for that date but i want it to return the blank so when i take the average the blanks are not lowering the average with the zeros


Any help would great


Thank you.
 
Hi Rlopez24,


So where do you want to change in Vlookup Part or in Average Part..

If Vlookup, Then

Code:
=IF(ISBLANK(VLOOKUP(Value,SearchTable,Column(),0)),"",VLOOKUP(Value,SearchTable,Column(),0))


else


[code]=AVERAGEIF(RangeArea,">"&0)

For excel below 2007,

=SUM(RangeArea)/COUNTIF(RangeArea,">"&0)[/code]


Regards,

Deb
 
Hi, Rlopez24!


If Debraj Roy weren't so perceptive and discerning it'd have been difficult for anyone who might read this to hit the mark with the provided info. Posting the link to sample file, copying & pasting values and formulas, specifying a couple of examples, that will surely help people to aid you better.


Regards!
 
You can also do the following:


Cells | Formatting | Custom and then add following custom format:

0;-0;""


whenever the result will be zero the cell will appear blank.
 
Hi, Rlopez24!

Take care of the differences between Debraj Roy's and shrivallabha's solutions: 1st one actually leaves a blank ("") as cell value while 2nd still leaves a zero (0) but displayed format edited.

Even if both are visually the same, as per your requirements shrivallabha's solution won't give you the right average.

Regards!
 
Back
Top