# Calculating the number of days between a set date and today

#### broncos347

##### Active Member
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.

#### barry houdini

##### MrExcel MVP
If your set date is in A1

=ABS(A1-Today())

#### NBVC

##### Well-known Member
=Datedif(A1,today(),"d") or Datedif(Today(),A1,"d") depending on which date is later.

#### nbrcrunch

##### Well-known Member
In Excel's help system, search for functions. From there navigate to Date functions.

You are probably looking for the DATEDIFF function.

#### NBVC

##### Well-known Member
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

#### broncos347

##### Active Member
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.

#### barry houdini

##### MrExcel MVP
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="")

Replies
13
Views
412
Replies
3
Views
254
Replies
1
Views
210
Replies
0
Views
385
Replies
2
Views
242

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.

### Which adblocker are you using?

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

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