+ Reply to Thread
Results 1 to 3 of 3

Thread: macro for age

  1. #1
    Registered User
    Join Date
    05-24-2011
    Location
    Minneapolis, MN
    MS-Off Ver
    Word 2010
    Posts
    4

    macro for age

    Hello,

    I am sure this has been addressed before but my simple search did not find a result.
    Is there a macro to display someone's age based on their DOB from a merge?

    Thanks!
    Christian

  2. #2
    Forum Guru Domski's Avatar
    Join Date
    12-14-2009
    MS-Off Ver
    What does it matter?
    Posts
    3,933

    Re: macro for age

    So you have someone's date of birth in a column and you want their age to use in a mail merge? You can use a formula like this to calculate their age in a spare column: =DATEDIF(A1,TODAY(),"Y")

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    05-24-2011
    Location
    Minneapolis, MN
    MS-Off Ver
    Word 2010
    Posts
    4

    Re: macro for age

    Quote Originally Posted by Domski View Post
    So you have someone's date of birth in a column and you want their age to use in a mail merge? You can use a formula like this to calculate their age in a spare column: =DATEDIF(A1,TODAY(),"Y")

    Dom
    Thank you Dom, This should work.

    Does it work if I am pulling dates from a merge instead of a column? I am happy to replace A1 with a merge field, but I don't know if it will populate correctly. Just checking.

+ 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.2.0