+ Reply to Thread
Results 1 to 3 of 3

Difficulty with an Age macro

  1. #1
    Registered User
    Join Date
    01-13-2009
    Location
    Prince Rupert, BC
    MS-Off Ver
    Excel 97, 2003
    Posts
    54

    Difficulty with an Age macro

    I'm working on project where I need a person's age on a specified date displayed as a decimal value. The code I have so far displays the age as a whole number.

    Please Login or Register  to view this content.
    I've attached a sample workbook.

    Mister P
    Attached Files Attached Files
    Last edited by Mister P; 01-05-2011 at 07:00 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Difficulty with an Age macro

    Hello Mister P,

    The problem is you are returning the difference in whole years. There are many decimal fractions that could be used like days or months. I decided on months. Here is the loop with the change to reflect the age in years with the decimal based on months.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    01-13-2009
    Location
    Prince Rupert, BC
    MS-Off Ver
    Excel 97, 2003
    Posts
    54

    Re: Difficulty with an Age macro

    Leith,
    This is exactly what I was trying to accomplish. Perfect for my application. Thank you so much.

    Mister P

+ 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