+ Reply to Thread
Results 1 to 4 of 4

Counting number of years from date to today

  1. #1
    Registered User
    Join Date
    11-23-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    56

    Counting number of years from date to today

    I have a data base with the date owners bought houses (6/1/88) and I am looking for a formula that will calculate how many years, months, days from that date to today. How do I do that?

  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,938

    Re: Counting number of years from date to today

    A
    B
    C
    1
    6/1/1988
    2/13/2015
    26 years 8 months 12 days

    C1=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"
    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
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: Counting number of years from date to today

    Assumed your date in A1:

    Put this on B1:

    =TRIM(IF(INT((TODAY()-A1)/365,25)=0,"",INT((TODAY()-A1)/365,25)&" Years")&" "&IF(INT(MOD((TODAY()-A1)/365,25,1)*12)=0,"",INT(MOD((TODAY()-A1)/365,25,1)*12)&" Months")&" "&IF(INT(MOD((TODAY()-A1)/30,44,1)*30,44)=0,"",INT(MOD((TODAY()-A1)/30,44,1)*30,44)&" Days"))

  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,938

    Re: Counting number of years from date to today

    Looking at azumi's post reminded me that I wanted to add...
    if you dont want to put =TODAY() in its own cell, you could include it into my formula like this...
    =IF(DATEDIF(A1,TODAY(),"y")=0,"",DATEDIF(A1,TODAY(),"y")&" years ")&IF(DATEDIF(A1,TODAY(),"ym")=0,"",DATEDIF(A1,TODAY(),"ym")&" months ")&DATEDIF(A1,TODAY(),"md")&" days"

    (if you have a LOT of dates to check, it would be better to have it in it's own cell, then reference it)

+ 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. Auto generate the date today but 3 years from now
    By aledrhys666 in forum Excel General
    Replies: 3
    Last Post: 07-10-2013, 09:31 AM
  2. Counting number of people who are new hires based on today's date.
    By wilsonmedic in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-20-2012, 11:22 AM
  3. calculate no. of years between a date and today's date
    By Aladin Akyurek in forum Excel Formulas & Functions
    Replies: 36
    Last Post: 09-06-2005, 07:05 AM
  4. [SOLVED] calculate no. of years between a date and today's date
    By Aladin Akyurek in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 06:05 AM
  5. Calculat years married or age of someone on today's date
    By Chersie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-21-2005, 04:06 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