+ Reply to Thread
Results 1 to 10 of 10

How to calculate age?

  1. #1
    Registered User
    Join Date
    09-06-2022
    Location
    Greece
    MS-Off Ver
    Microsoft Office 365 for Business
    Posts
    20

    How to calculate age?

    Hello all,

    I have a column called Date of Birth and a column called Age.

    The Date of Birth is formatting using Date in English US locale (E.g. 15-Feb-1980).
    The Age is formatting as Number.

    I need to calculate the Age.
    Which is the proper way to do this?

    Do I have to use a today or now function?

    Thank you in advance.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,434

    Re: How to calculate age?

    Welcome to the forum.

    Try this:

    =DATEDIF(A1,TODAY(),"y")

    where A1 contains the DoB.

    Administrative Note:

    Although we value your privacy as much you do, it could be important that members have a rough idea of your location as the solutions they offer may be affected by your locale. For instance, you might in the future post questions which are related to your regional settings.

    With this in mind, please update your profile to something more precise (something such as UK, Europe, USA, UAE, etc. will suffice).

    Thank you for helping us to help you.
    Last edited by AliGW; 09-06-2022 at 11:13 AM. Reason: Typo corrected.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    09-06-2022
    Location
    Greece
    MS-Off Ver
    Microsoft Office 365 for Business
    Posts
    20

    Re: How to calculate age?

    Thank you for your reply, AliGW.

    Unfortunately the DATEDIF is not working.

    A message there's a probelm with this formula appear.
    Last edited by fatammag; 09-07-2022 at 03:02 AM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,434

    Re: How to calculate age?

    It will work, but I need to see a sample workbook.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

  5. #5
    Registered User
    Join Date
    09-06-2022
    Location
    Greece
    MS-Off Ver
    Microsoft Office 365 for Business
    Posts
    20

    Re: How to calculate age?

    Here's the attachment.

    Book1.xlsx

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,434

    Re: How to calculate age?

    Yes, it works:

    =DATEDIF(A2,TODAY(),"Y")

    For your Greek locale:

    =DATEDIF(A2;TODAY();"Y")

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    B
    1
    Date of Birth
    Age
    2
    25-Mar-2018
    4
    3
    17-Sep-2000
    21
    4
    21-Feb-1980
    42
    Sheet: Sheet1
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-06-2022
    Location
    Greece
    MS-Off Ver
    Microsoft Office 365 for Business
    Posts
    20

    Re: How to calculate age?

    What did you done and it worked?
    I used the exactly code myself.

    Only the Greek locale is working.
    Last edited by AliGW; 09-07-2022 at 03:31 AM. Reason: Please DON'T quote unnecessarily!

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,434

    Re: How to calculate age?

    That's why we need to know your location. The formula is automatically updated to your locale when you open the workbook, so my formula using commas converts to your formula using semi-colons.

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  9. #9
    Registered User
    Join Date
    09-06-2022
    Location
    Greece
    MS-Off Ver
    Microsoft Office 365 for Business
    Posts
    20

    Re: How to calculate age?

    Thank you, AliGW for your help!

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,434

    Re: How to calculate age?

    You're welcome.

+ 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. Index Match to calculate data - Filter calculate
    By Tgbell in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-03-2019, 01:46 PM
  2. Replies: 1
    Last Post: 01-07-2018, 10:30 AM
  3. Replies: 5
    Last Post: 06-11-2017, 01:51 AM
  4. Code to Calculate the product of two matrices won't calculate
    By njrobby in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-05-2015, 01:37 AM
  5. Target.Calculate to Me.Calculate breaks Copy/Paste
    By vayana in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-27-2013, 10:36 AM
  6. [SOLVED] Calculate values in col B based on value in col B but only calculate final 5 instances
    By arnoldd99 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-04-2013, 11:53 AM

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