+ Reply to Thread
Results 1 to 2 of 2

LEFT, RIGHT and FIND

  1. #1
    Registered User
    Join Date
    11-14-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    8

    LEFT, RIGHT and FIND

    Hi

    I'm trying to extract some data from a string. An example of the string is: ABBN Aug14 12000 P.

    The third term (12000) can be anywhere between 1 and 5 figures long. The last figure (P) will either be P or C.

    I'm trying to extract purely the third term, despite its length. This seems to work but only when the third term is either 4 or 5 figures long:

    =IFERROR(IF(FIND(" ",LEFT(RIGHT(A2,7),5),1)=1,RIGHT(LEFT(RIGHT(A2,7),5),4),LEFT(RIGHT(A2,7),5)),LEFT(RIGHT(A2,7),5))

    Any ideas?!

    Thanks

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: LEFT, RIGHT and FIND

    Try this formula

    in B1

    it will work on any length to extract the third group of characters.

    =TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",255)),(COLUMNS($A:$C)-1)*255+1,255))

    Or just this

    =TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",255)),2*255,255))

    A
    B
    1
    ABBN Aug14 12000 P. 12000
    Last edited by AlKey; 07-23-2014 at 12:08 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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] Left/right find
    By jwillis07 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2014, 04:29 AM
  2. [SOLVED] Left with find?
    By namluke in forum Excel General
    Replies: 7
    Last Post: 06-14-2014, 02:51 PM
  3. [SOLVED] Left with Find vba
    By redmarko in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-22-2013, 05:01 PM
  4. =FIND from right instead of left?
    By mewingkitty in forum Excel General
    Replies: 3
    Last Post: 11-27-2008, 04:16 AM
  5. Left, Right, Mid, Find...
    By Petitboeuf in forum Excel General
    Replies: 4
    Last Post: 02-27-2007, 11:12 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