DATEIF Formula

mikeywhits

Board Regular
Joined
Jun 7, 2010
Messages
80
Hi all,

I currently have the following formula

=IF(I1>TODAY(),0,DATEDIF(I1,TODAY(),"d"))

This basically calculates the number of days from the date inputted into I1 up until todays date, placing an "0" if the date inputted into I1 has not occured yet.

As i have 10 lines of this running from I1 to I10 i have input a =SUM(I1:I10) to calculate the total days of all these rows. Supposing none of these dates have occured yet, the formula places ten "0"'s into each row along column I, though the SUM figure of these gives an total of 40722.

Can anyone help please?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
40722 is the date serial number for today's date - 28th June 2011 - are you sure you are summing the right range - it can't be I1:I10 where the formulas are if the formulas also reference that range?
 
Upvote 0

Forum statistics

Threads
1,224,534
Messages
6,179,391
Members
452,909
Latest member
VickiS

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