+ Reply to Thread
Results 1 to 3 of 3

Extracting data from a string using conditions

  1. #1
    Forum Contributor
    Join Date
    01-27-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    120

    Extracting data from a string using conditions

    Hi,

    I have the following data and I want to extract the test either side of the "-".

    So:
    ABC-A56-Portman Rd
    AFG-A56a-Smith Street
    ACD-A486b-Dalbeattie Street.

    I have tried the LEFT & RIGHT Functions but I am struggling with getting the data out in between the "-" & "-"
    S0 - A56, A56a, A486b

    Any ides?

    Terry

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,944

    Re: Extracting data from a string using conditions

    If they all start as AAA-

    try

    =MID(SUBSTITUTE(A1,"-","|",2),5,FIND("|",SUBSTITUTE(A1,"-","|",2))-5)

  3. #3
    Forum Contributor
    Join Date
    01-27-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    120

    Re: Extracting data from a string using conditions

    Hi John,

    That works fine,

    Thanks very much.

    T.

+ 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] Extracting data from a string
    By vanthetsar in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-23-2015, 09:52 AM
  2. [SOLVED] Extracting data from the middle of a cell depending on a set of conditions
    By geneticsstudent in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-06-2015, 11:06 AM
  3. [SOLVED] Extracting data from a string
    By pickslides in forum Excel General
    Replies: 9
    Last Post: 04-09-2014, 02:36 AM
  4. Extracting data giving conditions
    By Nero_slk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-14-2013, 10:26 AM
  5. Extracting unique data that meets specific conditions
    By tekobayashi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-07-2013, 08:44 AM
  6. Excel 2007 : Extracting data from a string
    By Icehockey44 in forum Excel General
    Replies: 6
    Last Post: 05-21-2012, 09:43 AM
  7. Extracting data from a string
    By Robz19 in forum Excel General
    Replies: 5
    Last Post: 02-28-2012, 08:48 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