+ Reply to Thread
Results 1 to 7 of 7

Extract ID to DOB become backwards

  1. #1
    Forum Contributor
    Join Date
    05-10-2019
    Location
    Penang, Malaysia
    MS-Off Ver
    2016
    Posts
    262

    Extract ID to DOB become backwards

    Hi All,
    I cant recalled for I have copied this formula from somewhere, but it happens to be backwards. =IFERROR(IF(A2="","",(TEXT(MID(A2,3,4)&LEFT(A2,2),"00\/00\/00")+0)),"Invalid Date")

    The ID format is: 75(year), 04(Month), 03(day). I have put the date format to (d-mmm-yyyy).
    The DOB displayed as 4-Mar-1975 which is backwards/incorrect. The correct DOB should be 3-Apr-1975. I have changed the MID but no luck to get it fixed.

    Any help is greatly appreciated & please find attachment.

    Thank-You very much.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Extract ID to DOB become backwards

    One way;

    =DATEVALUE(MID(A2,5,2)&"/"&MID(A2,3,2)&"/"&LEFT(A2,2))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Extract ID to DOB become backwards

    Try this:

    =DATEVALUE(MID(A2,5,2)&"/"&MID(A2,3,2)&"/"&LEFT(A2,2))
    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.

  4. #4
    Forum Contributor
    Join Date
    05-10-2019
    Location
    Penang, Malaysia
    MS-Off Ver
    2016
    Posts
    262

    Re: Extract ID to DOB become backwards

    Hi Glenn, AliGW,

    Thanks for your help. Yes, your formula works.
    Will mark this thread to SOLVED & reputation issued to you both.

    Thank-You very much.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Extract ID to DOB become backwards

    You're welcome.

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Extract ID to DOB become backwards

    Please try

    =--TEXT(20-(LEFT(A2)>"3")&LEFT(A2,6),"0-00-00")

  7. #7
    Forum Contributor
    Join Date
    05-10-2019
    Location
    Penang, Malaysia
    MS-Off Ver
    2016
    Posts
    262

    Re: Extract ID to DOB become backwards

    Hi Bo_Ry,
    Your formula works too. Issued a reputation to you too.

    Thank-You very much

+ 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. Look Columns Backwards?
    By ptmuldoon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-24-2017, 12:43 AM
  2. Backwards Vlookup
    By newbie13 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-21-2014, 03:57 PM
  3. Is VBA Always written backwards?
    By g48dd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2011, 03:32 PM
  4. [SOLVED] Can you work this backwards
    By Box666 in forum Excel General
    Replies: 1
    Last Post: 11-22-2005, 01:40 PM
  5. vlookup backwards
    By jtoy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  6. Match Backwards
    By Gary's Student in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-21-2005, 01:06 PM
  7. backwards sum
    By choice in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2005, 04:48 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