Excel - between two dates

  Dirty Dick 15:35 13 Feb 07
Locked

I'm trying to set up a spreadsheet so that each time I open it, the time between two dates is calculated. The two dates would be today (the day I open the spreadsheet) and a date about 10 years away. Any help would be appreciated.

Thanx

DD

  VoG II 15:41 13 Feb 07

For example

in A1 30/03/2017

in B1 =TODAY()

in C1 =DATEDIF(B1,A1,"d")

  JimT 16:13 13 Feb 07

If you want to calculate the period between the two dates use the YEARFRAC function (ie fx on the Toolbar)

JimT

  VoG II 16:25 13 Feb 07

=DATEDIF(B1,A1,"y") & " Years " & DATEDIF(B1,A1,"ym") & " Months " & DATEDIF(B1,A1,"md") & " Days"

  Dirty Dick 19:35 13 Feb 07

VoG™ and JimT. Used the final one of VoGs™, and works superbly.

  chocolate cake 21:11 13 Feb 07

book

  Migwell 00:44 14 Feb 07

=now() in say A1
and the date you wish to equate from say A2

  Dirty Dick 23:27 05 Feb 08

.......... I seem to have a problem on my worksheet.

I have the formula...
=DATEDIF(Data!M2,C6,"y") & " Years " & DATEDIF(Data!M2,C6,"ym") & " Months " & DATEDIF(Data!M2,C6,"md") & " Days"

and in another cell (to calculate the "days" ...

= DATEDIF(Data!M2,C4,"d")

but on shows 29 days and the other shows 27 days.

Why is this?

Thanx again

DD

  johnnyrocker 23:30 05 Feb 08

advise you to start your own threadas this will not get looked at much cos of tick


johnny

  VoG II 08:51 06 Feb 08

What is in Data!M2, C6 and C4?

  Dirty Dick 09:27 06 Feb 08

In Data!M2 (on a seperate worksheet called Data) is the formaula for todays date { =TODAY() }

The other two cells I have copied from the wrong place and should be formula

=DATEDIF(Data!M2,C4,"y") & " Years " & DATEDIF(Data!M2,C4,"ym") & " Months " & DATEDIF(Data!M2,C4,"md") & " Days"

and

= DATEDIF(Data!M2,C4,"d")

This thread is now locked and can not be replied to.

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

Method Studios' title sequence for BBC series Taboo is truly unsettling

Best Pages for iOS tips | How to use Pages for iPad & iPhone: 7 simple tips to get more out of…