Ozgrid Excel Help & Best Practices Forums

Excel Training / Excel Dashboards Reports

# Thread: Blank Cell If Value Is Zero

1. ## Blank Cell If Value Is Zero

Afternoon all

I am looking for some help making the formula i am using appear blank if there is not yet values entered in the cells

i am using =DATEDIF(A1,B1,"m")

i am trying to find the difference between 2 dates in months but if the values have not been entered into the cells then it populates as zero? is there a way i can leave it blank

Terri

Excel Video Tutorials / Excel Dashboards Reports

2. Super Moderator
Join Date
1st December 2006
Posts
1,375

## Re: Blank Cell If Value Is Zero

Hi Terri,

Assuming the dates are in cells A1 & B1, use the following formula in your destination cell:

=IF(OR(A1="",B1=""),"",DATEDIF(A1,B1,"m"))

Kind regards,

Robert
: D

Excel Video Tutorials / Excel Dashboards Reports

3. ## Re: Blank Cell If Value Is Zero

thanks so much your a life saver : D

Excel Video Tutorials / Excel Dashboards Reports

4. Super Moderator
Join Date
26th January 2003
Location
Derbyshire,UK
Posts
19,808

## Re: Blank Cell If Value Is Zero

You can also hide zeros from the Tools > Options > View menu

5. Super Moderator
Join Date
7th December 2005
Location
Hampshire, England
Posts
4,898

## Re: Blank Cell If Value Is Zero

Originally Posted by royUK
You can also hide zeros from the Tools > Options > View menu
If you do this, it is important to realise that the cell content will still be 0, not blank, so any tests for cell contents must still be for 0 - can be a bit confusing.

Excel Video Tutorials / Excel Dashboards Reports

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
porno