Formula needed to calculate days between two dates, but need 0 if one cell is blank

jengoz

New Member
Joined
Jan 18, 2017
Messages
3
Hi there, this is my first time posting here! I would appreciate any help with the following:

I need to calculate days between two dates in two cells, but if one of those two cells is blank, I want the cell with the formula to remain blank or 0.

Example:

A4 has todays date: 1/18/17
C17 has the date of 12/31/16
I want cell E17 to tell me the number of dates between these two dates. But I also want this formula to have E17 be blank or zero if C17 were blank.

Can anyone help me with this? Thank you in advance!
 

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.
OMG! That worked perfectly! Okay one more questions...so now, I have this forumal in E17 =F17/30*E17, which uses the answer from C17 formula =IF(C17="","",ABS(A4-C17)) to give me a dollar amount. but when it is blank it gives me the VALUE error message. How can I change the formula in E17 to still calculate correctly if there is a date but be blank or zero if there isn't a date in C17?

I need to calculate vacancy loss. So here are the figures I am using:
A4 = 1/18/17
C17=1/1/17
E17 ==IF(C17="","",ABS(A4-C17))
F17 = f17 = Rent amount $500
G17 = F17/30*E17 - but if there is no date in c17 it gives me an error. How can I make it be blank or zero?

Thanks again for such a prompt response!
 
Upvote 0

Forum statistics

Threads
1,222,630
Messages
6,167,191
Members
452,104
Latest member
jadethejade

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