+ Reply to Thread
Results 1 to 6 of 6

How to count dates assuming that the year changes?

  1. #1
    Registered User
    Join Date
    03-08-2012
    Location
    Zuneid Sidat
    MS-Off Ver
    Excel 2011 Mac
    Posts
    5

    How to count dates assuming that the year changes?

    I am creating a table which looks like this

    A1: 15/12/2011
    B1: 31/01/2012
    C1: Today()
    D1: In this cell i want to count the days from C1 to reach B1. The problem is, i want to assume has continuous years. For example. Today is 08/03/2012. I want to count assuming that B1 is 2013, after C1 round again and passes B1 assume 2014, continuing until...

    Thanks

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: How to count dates assuming that the year changes?

    so what is the final result wanted in D1? or are you looking to have a D1,D2,D3, each a year further?
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Registered User
    Join Date
    03-08-2012
    Location
    Zuneid Sidat
    MS-Off Ver
    Excel 2011 Mac
    Posts
    5

    Re: How to count dates assuming that the year changes?

    D1 Final result is the number of days from C1 to B1 but when but when C1 is bigger than B1 than the formula must A1+1year and B1+1year....

    Only D1... I won't add D2,D3 etc

  4. #4
    Registered User
    Join Date
    03-08-2012
    Location
    Zuneid Sidat
    MS-Off Ver
    Excel 2011 Mac
    Posts
    5

    Re: How to count dates assuming that the year changes?

    Or how can i put the date only with day and month??? actually i don't even need the year...

    A1 is the start date
    B1 is the end date

    D1 i want to know how many days untill i get to B1 again...

  5. #5
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: How to count dates assuming that the year changes?

    i think i get it, try this:

    =IF(B1-C1>0,B1-C1,DATE(YEAR(C1)+1,MONTH(B1),DAY(B1))-C1)

    this does not factor in cell A1, it uses cell C1.

  6. #6
    Registered User
    Join Date
    03-08-2012
    Location
    Zuneid Sidat
    MS-Off Ver
    Excel 2011 Mac
    Posts
    5

    Re: How to count dates assuming that the year changes?

    Perfect... Thank You

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1