+ Reply to Thread
Results 1 to 8 of 8

Add 12 months to a date and then subtract TODAY()

Hybrid View

  1. #1
    Registered User
    Join Date
    04-25-2014
    Location
    Fayetteville, NC
    MS-Off Ver
    Excel 2010
    Posts
    5

    Add 12 months to a date and then subtract TODAY()

    I have tried to do this for the last hour or so and it's kicking my butt. I'm in Excel 2010, and the cell with the date I want to work from is G22, can anyone help me please?

    EDIT: I'm trying to get the difference of the (date+12 months)-TODAY() to appear in months and days. (I also meant H22 not G22)

    Here's the latest thing I tried (that doesn't work):

    =IF(DATEDIF(H22,TODAY(),"y")>=1,DATEDIF(H22,TODAY(),"y")&" yrs, "&DATEDIF(H22,TODAY(),"ym")&" mths, "&DATEDIF(H22,TODAY(),"md")&" days",IF(DATEDIF(H22,TODAY(),"ym")>=1,DATEDIF(H22,TODAY(),"ym")&" mths, "&DATEDIF(H22,TODAY(),"md")&" days",DATEDIF(H22,TODAY(),"md")&" days"))

    EDIT #2: I guess I should probably note that the date in H22 is the result of another formula

    =EDATE(G22,12)
    Last edited by ScottWilliams324; 04-25-2014 at 08:33 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,957

    Re: Add 12 months to a date and then subtract TODAY()

    Hi and welcome to the forum

    Hard to offer suggestions without seeing a sample of the data you are working with, but try this...

    =EDATE(G22,12)-TODAY()
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-25-2014
    Location
    Fayetteville, NC
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Add 12 months to a date and then subtract TODAY()

    I'm sorry, I should have specified the formatting of the answer I was looking for. I'm trying to get the difference of the (date+12 months)-TODAY() to appear in months and days.

    (Editing initial post now)

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,957

    Re: Add 12 months to a date and then subtract TODAY()

    OK please supply a sample

    see if you can plug your values into this?

    =IF(DATEDIF(A1,B1,"y")=0,"",DATEDIF(A1,B1,"y")&" years ")&IF(DATEDIF(A1,B1,"ym")=0,"",DATEDIF(A1,B1,"ym")&" months ")&DATEDIF(A1,B1,"md")&" days"

  5. #5
    Registered User
    Join Date
    04-25-2014
    Location
    Fayetteville, NC
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Add 12 months to a date and then subtract TODAY()

    I just attached the sheet I'm working on to this post so you can see what I mean.
    Attached Files Attached Files

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,957

    Re: Add 12 months to a date and then subtract TODAY()

    If you are trying to exclude the rows with no dates, then maybe this?
    =IF(E4="","",IF(DATEDIF(E4,TODAY(),"y")>=1,DATEDIF(E4,TODAY(),"y")&" yrs, "&DATEDIF(E4,TODAY(),"ym")&" mths, "&DATEDIF(E4,TODAY(),"md")&" days",IF(DATEDIF(E4,TODAY(),"ym")>=1,DATEDIF(E4,TODAY(),"ym")&" mths, "&DATEDIF(E4,TODAY(),"md")&" days",DATEDIF(E4,TODAY(),"md")&" days")))

    (good work with adapting that to work for you

  7. #7
    Registered User
    Join Date
    04-25-2014
    Location
    Fayetteville, NC
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Add 12 months to a date and then subtract TODAY()

    Thanks, that fixed another problem I was having but I'm trying to fix the formula in I22 as shown in this picture.

    error.png

  8. #8
    Registered User
    Join Date
    04-25-2014
    Location
    Fayetteville, NC
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Add 12 months to a date and then subtract TODAY()

    Never mind, BlueHornet at MrExcel.com figured it out.

    http://www.mrexcel.com/forum/excel-q...function.html#

    Thanks anyway.

+ 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. [SOLVED] Creating a view by filtering 2 columns by date (both within 3 months of today's date)
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-21-2014, 05:04 AM
  2. [SOLVED] How to get the date of 3 months ago from today?
    By billj in forum Excel General
    Replies: 5
    Last Post: 08-30-2013, 07:06 AM
  3. [SOLVED] Excel Macro: Ask user for date then subtract 6 months from it
    By foxy_420 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-21-2013, 11:09 AM
  4. Replies: 15
    Last Post: 06-26-2012, 07:28 AM
  5. [SOLVED] How do I subtract today's date from one before 1900?
    By Bob Martin in forum Excel General
    Replies: 3
    Last Post: 10-12-2005, 08:05 PM

Tags for this Thread

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