Excel - between two dates

  Dirty Dick 15:35 13 Feb 2007
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

  Dirty Dick 19:35 13 Feb 2007

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

  Migwell 00:44 14 Feb 2007

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

  Dirty Dick 23:27 05 Feb 2008

.......... 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 2008

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


johnny

  Dirty Dick 09:27 06 Feb 2008

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")

  Dirty Dick 09:41 06 Feb 2008

Sorry, C4 is the date we are calculating to, it's 03/03/2008, just typed in to the cell.

  Dirty Dick 10:18 06 Feb 2008

I've tried changing the date in cell C4 and I always get a discrepancy of 2 days. I've even opened a new workbook and I still get the same problem.

I'm stumped !

  Dirty Dick 11:39 06 Feb 2008

I have opened a new document, only 1 worksheet.

Cell A1 has: =Today()

Cell A2 has: =DATEDIF(A1,C1,"y") & " Years " & DATEDIF(A1,C1,"ym") & " Months " & DATEDIF(A1,C1,"md") & " Days ”

Cell A3 has: manual inputted 03/03/2008

Cell A4 has: =DATEDIF(A1,C1,"d") & " Days"


BUT I STILL GER A DIFFERENCE OF 2 DAYS !!!

  Dirty Dick 12:41 06 Feb 2008

=C1-A1 gives the answer

26

  Dirty Dick 14:33 06 Feb 2008

Copied & Pasted both the above and........

... One gives 26 days ...

... And the other gives 28 days

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

Elsewhere on IDG sites

OnePlus 7 Pro review

Why Jeron Braxton mixes politics with Playstation visuals - and how he's already the 'world's best '…

iPhone XR 2019 release date, price & specs rumours

Comment faire une sauvegarde de son PC ?