Calculating the number of days between a set date and today

broncos347

Active Member
Joined
Feb 16, 2005
Messages
285
Office Version
  1. 365
Platform
  1. Windows
I trying to work out what formula i should use to determine the number of days between a set date and the current date.

Can anyone help.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
=Datedif(A1,today(),"d") or Datedif(Today(),A1,"d") depending on which date is later.
 
Upvote 0

nbrcrunch

Well-known Member
Joined
Jan 1, 2003
Messages
2,062
In Excel's help system, search for functions. From there navigate to Date functions.

You are probably looking for the DATEDIFF function.
 
Upvote 0

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
ADVERTISEMENT
nbrcrunch said:
In Excel's help system, search for functions. From there navigate to Date functions.

You are probably looking for the DATEDIFF function.

nbrcrunch, I don't think there is any help files in the Excel Help for the DATEDIF function. It is one of those functions that used to be used more often I guess, and for some reason Excel kept it in their later versions available but without help files. I am not sure exactly of the history :confused:
 
Upvote 0

broncos347

Active Member
Joined
Feb 16, 2005
Messages
285
Office Version
  1. 365
Platform
  1. Windows
Thanks I used the ABS formula and it works.

Just looking at the results I have got, is there anyway to add another part to the formula so that if a cell (further along the spreadsheet, say E1) has a date in it then this cell (A1) reports a zero.
 
Upvote 0

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
ABS is only necessary if you won't be sure whether A1 is greater than TODAY() or not, if you always know which is greater (or if you don't care and don't mind getting a negative result), e.g. if A1 is always in the future, then you could just use

=A1-TODAY()

If E1 either has a date or is blank then try

=(A1-TODAY())*(E1="")
 
Upvote 0

Forum statistics

Threads
1,195,700
Messages
6,011,196
Members
441,594
Latest member
AVO

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
Top