+ Reply to Thread
Results 1 to 6 of 6

Need help in adjusting date of birth year

  1. #1
    Registered User
    Join Date
    05-07-2012
    Location
    Floridaq
    MS-Off Ver
    Excel 2007
    Posts
    2

    Need help in adjusting date of birth year

    I'm new here and to Excel, I hope I am at the right place.
    Problem. I receive a file from QuickBooks that has the wrong century on some datesw of Birth.
    DOB. Ex: 03/05/2028. I know why it is happening but I need to correct it in Excel.
    I think it's as simple as having a function that would check the year and if it is 2000, then subt 100.
    I have tried several times and exhausted my search for the correct answer. Any help here is greatly appreciated.

    Chet

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Need help in adjusting date of birth year

    Hi Chet,

    Let's say you date is in A1

    If you just need to adjust the year then try

    =DATE(1960,MONTH(A1),DAY(A1))

    or if you want to check the date and if found, change it to something else

    =DATE(IF(YEAR(A1)=2000,1960,""),MONTH(A1),DAY(A1))
    HTH
    Regards, Jeff

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Need help in adjusting date of birth year

    Hi Chet,

    Welcome to the forum.

    Assuming you have the DOB in column A, use below formula in column B and drag it down:-

    =IF(VALUE(LEFT(YEAR(A1),2))=20,DATE(YEAR(A1)-100,MONTH(A1),DAY(A1)),A1)

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Need help in adjusting date of birth year

    =if(year(a1)>=2000,date(year(a1)-100,month(a1),day(a1)),a1)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Need help in adjusting date of birth year

    Or

    =IF(YEAR(A1)>2000,EDATE(A1,-1200),A1)

  6. #6
    Registered User
    Join Date
    05-07-2012
    Location
    Floridaq
    MS-Off Ver
    Excel 2007
    Posts
    2

    Red face Re: Need help in adjusting date of birth year

    I can't beleive so many quick responses. Thanks a millon. I will try them all.

    One thing I didn't point out may make a difference... My field is in col "I". Only want to change the year of 20. because it should have been 19 It is 100 years off. I wanted to do the change and keep it in "I" . If I create a new col, then only the changed gets to the new col.

    Thanks to all that resonded, I will get back and let you know how I work it out.

    Chet

+ 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