+ Reply to Thread
Results 1 to 4 of 4

Extract text from a string of text

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Question Extract text from a string of text

    Hi,

    Can anyone advise me how I would extract text from a string of text e.g. I want to extract the first part of the text up until the – sign and also exclude the space before it

    e.g.

    NRB - LNG-LIC the expected output would be NRB

    TRM ELECTRIC - BSG-INFS the expected output would be TRM ELECTRIC

    TRM GAS - TRM-ASMN-ENI the expected output would be TRM ELECTRIC


    Any assistance would be greatly appreciated


    Many thanks in advance

    Rob
    Rob

  2. #2
    Registered User
    Join Date
    09-06-2013
    Location
    miami, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Extract text from a string of text

    Hey Rob,

    Assuming you data is in cell A1, you can create a new column and type this formula:
    =LEFT(A1,SEARCH("-",A1)-1)
    Search will give the position of "-". Left returns the specified number characters from a text string.

  3. #3
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Re: Extract text from a string of text

    hlpplease,

    Many thanks for your very prompt reply it worked a treat

    Thanks again

    Rob

  4. #4
    Registered User
    Join Date
    09-06-2013
    Location
    miami, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Extract text from a string of text

    Rob,
    Please select SOLVED if I was able to answer your question

+ 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] Find and extract text string from within another text string
    By huy_le in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-12-2013, 03:22 PM
  2. Find and extract text string from within another text string
    By huy_le in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-09-2013, 09:01 PM
  3. Extract text after the LAST special character in a text string
    By phrankndonna in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-21-2013, 11:16 AM
  4. Replies: 5
    Last Post: 05-03-2011, 09:35 AM
  5. EXTRACT TEXT FROM TEXT STRING:The names are of variable length
    By carricka in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-08-2005, 06:05 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