+ Reply to Thread
Results 1 to 7 of 7

Extracting numbers from text and converting into a date

  1. #1
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Wisbech England
    MS-Off Ver
    Excel 2010
    Posts
    308

    Extracting numbers from text and converting into a date

    Hi I have this text "WSOPE3800 - Fire Alarm Checks v4 12082013" in my cell and I would like to extract only "12082013" but I would like it to be converted into a date format like 12/08/2013 is this possible and if so does anyone knows the right formula to acheive this?
    Thank you
    Dan

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Extracting numbers from text and converting into a date

    does these dates always appears at the end and 8 characters in length ?
    or could you post some more examples ?
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Wisbech England
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Extracting numbers from text and converting into a date

    Quote Originally Posted by hemesh View Post
    does these dates always appears at the end and 8 characters in length !
    Hi
    Yes they should always appear at the end :-)
    Thank you
    Dan

  4. #4
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Extracting numbers from text and converting into a date

    assuming your data is in a1 then in b1 try below
    =DATEVALUE(LEFT(RIGHT(A1,8),2)&"/"&MID(RIGHT(A1,8),3,2)&"/"&RIGHT(RIGHT(A1,8),4)) then format column as date and will be treated as actual dates

    if you just want it to look alike dates then use
    =LEFT(RIGHT(A1,8),2)&"/"&MID(RIGHT(A1,8),3,2)&"/"&RIGHT(RIGHT(A1,8),4)

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Extracting numbers from text and converting into a date

    =RIGHT(A2,2)&"/"&LEFT(RIGHT(A2,4),2)&"/"&Left(A2,4)
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Wisbech England
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Extracting numbers from text and converting into a date

    Quote Originally Posted by oeldere View Post
    =RIGHT(A2,2)&"/"&LEFT(RIGHT(A2,4),2)&"/"&Left(A2,4)
    Thank you all for your help :-)
    Dan

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Extracting numbers from text and converting into a date

    This works for me...

    =--TEXT(RIGHT(A2,8),"0-00-0000")

    Format as Date

    If you're using the date format dd/m/yyyy you might have to swap some of the zeros around:

    =--TEXT(RIGHT(A2,8),"00-0-0000")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. [SOLVED] Converting text and numbers to a calendar date
    By FranAgrippina in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-14-2013, 01:16 PM
  2. [SOLVED] extracting numbers from a string of text and numbers
    By ScottLor in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2013, 04:47 PM
  3. Extracting numbers and text from inconsistent text/number formatted string
    By Brandivil in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-25-2013, 01:46 PM
  4. Replies: 17
    Last Post: 03-03-2010, 06:55 PM
  5. [SOLVED] Converting numbers formatted as text to numbers
    By Bill in forum Excel General
    Replies: 1
    Last Post: 07-19-2005, 03:05 PM

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