+ Reply to Thread
Results 1 to 8 of 8

Calculating year in past and future based on today's date

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    Frisco TX
    MS-Off Ver
    Excel 2010
    Posts
    8

    Calculating year in past and future based on today's date

    I am trying to create a spreasheet template to calculate forecasts, but want o have months and yeas in the past for the demand data, and future for the calculated forecasts. I have the months, but need to calculate teh dates for the months. Here is the data:

    DEMAND
    Month Year Year I want it to show
    June H-24 2014
    July H-23 2014
    August H-22 2014
    September H-21 2014
    October H-20 2014
    November H-19 2014
    December H-18 2014
    January H-17 2015
    February H-16 2015
    March H-15 2015
    April H-14 2015
    May H-13 2015
    June H-12 2015
    July H-11 2015
    August H-10 2015
    September H-9 2015
    October H-8 2015
    November H-7 2015
    December H-6 2015
    January H-5 2016
    February H-4 2016
    March H-3 2016
    April H-2 2016
    May H-1 2016





    FORECAST
    June C 2016
    July C+1 2016
    August C+2 2016
    September C+3 2016
    October C+4 2016
    November C+5 2016
    December C+6 2016
    January C+7 2017
    February C+8 2017
    March C+9 2017
    April C+10 2017
    May C+11 2017

    It is hard to tell from this (also attaching raw spreadsheet), but the second column is where I wan the year to appear, and the last column is would be the year I would want to show there. Since this is dynamix, and each month and year might change based upon when the user opens the spreadsheet, I can't just hardcode the dates. This was done on June 9, so if I open it August 8, the first month would be August.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Calculating year in past and future based on today's date

    in D3

    2014 (or your start year)

    in D4 and copy down

    =IF(MONTH(1&A4)=1,D3+1,D3)

  3. #3
    Registered User
    Join Date
    03-25-2013
    Location
    Frisco TX
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Calculating year in past and future based on today's date

    Thank you.
    This updates the row that is equivalent to January, but not the months Feb - May when today is in June, or Feb - June when in July, etc.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Calculating year in past and future based on today's date

    Don't understand your last post: are you referring to the forecast years which I missed?

    this D34 will give year

    =IF(MONTH(1&A4)=1,D33+1,D33)

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Calculating year in past and future based on today's date

    If you are starting from TODAY() ..

    D26 =YEAR(Today())

    in D25 and UP ...

    =IF(MONTH(1&A25)=12,D26-1,D26)

  6. #6
    Registered User
    Join Date
    03-25-2013
    Location
    Frisco TX
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Calculating year in past and future based on today's date

    No, this is in the demand section (top). When DEMAND
    Month Year Year I want it to show
    June 2014 H-24 2014
    July 2014 H-23 2014
    August 2014 H-22 2014
    September 2014 H-21 2014
    October 2014 H-20 2014
    November 2014 H-19 2014
    December 2014 H-18 2014
    January 2015 H-17 2015
    February 2014 H-16 2015
    March 2014 H-15 2015
    April 2014 H-14 2015
    May 2014 H-13 2015
    June 2014 H-12 2015
    July 2014 H-11 2015
    August 2014 H-10 2015
    September 2014 H-9 2015
    October 2014 H-8 2015
    November 2014 H-7 2015
    December 2014 H-6 2015
    January 2015 H-5 2016
    February 2014 H-4 2016
    March 2014 H-3 2016
    April 2014 H-2 2016
    May 2014 H-1 2016


    Notice Febrauary drops back to 2014, and the second January is still 2015, not 2016.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Calculating year in past and future based on today's date

    Not surprising as you did not apply my formula!

    in D3

    2014 (or your start year)

    in D4 and copy down

    =IF(MONTH(1&A4)=1,D3+1,D3)
    in B3

    =$XFD$1

    in B4 and copy down ..

    =IF(MONTH(1&A4)=1,B3+1,B3)

  8. #8
    Registered User
    Join Date
    03-25-2013
    Location
    Frisco TX
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Calculating year in past and future based on today's date

    That worked, excellent. Thank you very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 10
    Last Post: 09-06-2023, 08:19 PM
  2. [SOLVED] Calculating a future date based on a specific cell date
    By Teuchter029 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-23-2015, 05:30 PM
  3. Calculate Date 5 years in the future past today's date
    By RickCJ7 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-29-2015, 05:50 PM
  4. Calculating a future date based on a 360 day calendar
    By ertavis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-29-2012, 07:43 PM
  5. Replies: 1
    Last Post: 09-30-2012, 03:01 PM
  6. [SOLVED] Generate future date based on past date and day
    By bd528 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-14-2012, 04:23 PM
  7. Calculating multiple future dates based on one completion date
    By Staceyd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-04-2010, 03:38 PM

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