+ Reply to Thread
Results 1 to 8 of 8

Extract date from text string between certain characters

  1. #1
    Forum Contributor
    Join Date
    08-21-2014
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    232

    Question Extract date from text string between certain characters

    Hi folk,

    I'm struggling to pick out the numbers in a text string between certain characters AND return them as a UK date format.

    The issue is partly as the characters appear twice in the string and I just want to ones at the end, before the file extension;

    DOID20C_Scottish Family Living x4 (followers.10k)_02112019.png

    I'm wanting to get the 02112019 after the second _ and before the .XXX that is the file extension, in this case .png

    Can anyone assist please?

    Thanks,

    Ian
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,084

    Re: Extract date from text string between certain characters

    How about
    =REPLACE(REPLACE(LEFT(TRIM(RIGHT(SUBSTITUTE(C4,"_",REPT(" ",100),2),100)),8),3,0,"/"),6,0,"/")+0

  3. #3
    Forum Contributor
    Join Date
    08-21-2014
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    232

    Re: Extract date from text string between certain characters

    Thanks - it works except where there are more than 1 instance of _ before the last one, so ideally need to track from right end of string on the _ or find the last one regardless of how many prior there are

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Extract date from text string between certain characters

    Another option (if all of your data shows that pattern)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Contributor
    Join Date
    08-21-2014
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    232

    Re: Extract date from text string between certain characters

    So here it is with solution 1 - the second one falls over if the date has any numbers after it (which, apologies, that variant wasn't in the original sheet) so have attached a second version
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Extract date from text string between certain characters

    Try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    Re: Extract date from text string between certain characters

    here is another one copy paste below in E9 then drag down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    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

  8. #8
    Forum Contributor
    Join Date
    08-21-2014
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    232

    Re: Extract date from text string between certain characters

    ChemistB - that has worked perfectly on all variants. Thank you.

+ 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. Extract date from text string
    By Musciak in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-09-2019, 08:01 AM
  2. [SOLVED] Extract date and time from text string
    By iantix in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-14-2019, 10:30 AM
  3. [SOLVED] Extract cell text string between 2 different characters
    By Shallabee in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-18-2019, 08:09 AM
  4. [SOLVED] Formula to extract date from a string of text
    By robertguy in forum Excel General
    Replies: 3
    Last Post: 06-26-2017, 04:19 PM
  5. extract a date from a text string
    By theobrandt in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-02-2016, 08:30 AM
  6. Extract text between two characters in a string - varing text length
    By luv2birdie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-04-2014, 06:10 PM
  7. [SOLVED] Extract left characters from string with exception of 2 right characters
    By sweetkel23 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-16-2012, 10:45 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