Formula to calculate age in days

MarkDave

New Member
Joined
Mar 25, 2009
Messages
30
Office Version
  1. 365
Platform
  1. Windows
Hi, I need a formula to calculate the age of an entry in excel between two days, or today of the end date filed is yet to be completed...any ideas?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi,

You can use Datedif formula. Say H7 is Today and H9 is your required old date and the formula will be as =DATEDIF(H9,H7,"d")
it will give number of days between the two dates.
If you required to count the present date alson use =DATEDIF(H9,H7,"d")+1

Regards
Witson
 
Last edited:
Upvote 0
Hi,

You can use Datedif formula. Say H7 is Today and H9 is your required old date and the formula will be as =DATEDIF(H9,H7,"d")
it will give number of days between the two dates.
If you required to count the present date alson use =DATEDIF(H9,H7,"d")+1

Regards
Witson

Hi, that works great. My start day is e8 and end date u8 - if u8 is blank though, and in there is not yet an end date, I get an #num! Error. I need it to work out the days if u8 is blank using today as the ‘temporary’ end date until u8 is populated whenntnwill use that as the end date - does this make sense?
 
Upvote 0
Hi, to get the numbers of days between two dates you just need to subtract the older one from the newer one - no need for the undocumented datedif() function.

I need it to work out the days if u8 is blank using today as the ‘temporary’ end date until u8 is populated

For this you can try:

=IF(ISNUMBER(U8),U8,TODAY())-E8

Note: you might need to format the cell containing the formula as general or number.
 
Last edited:
Upvote 0
This is awesome thank you and works a treat. Just a thought, is it possible to extend this so the end date can be either u8, v8 or w8, or if all blank then today?
 
Upvote 0
Something like this then may work for you:

=IF(COUNT(U8:W8),MAX(U8:W8),TODAY())-E8
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,638
Latest member
Oluwabukunmi

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