+ Reply to Thread
Results 1 to 4 of 4

extract numbers from alphanumeric text string if 1st tier not available

  1. #1
    Registered User
    Join Date
    03-24-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    11

    extract numbers from alphanumeric text string if 1st tier not available

    I have this from my extract from accounting system.

    4010400 · Sales - Amkt Svc:4010450 · Sales Service 3rd party - MSA:4010452 · WV - Service Contract (NSB) 954,215.44
    5010101 · 3rd Party COS - Systems 48,423,699.30

    I know if there is only first tier of account numbers I can set with LEFT(A2,7) easily to get 5010101.
    How can I set a formula to extract the last tier of account number in that first example line to get result 4010452?

    Ie. result shown to be :-
    Column A Column B
    4010452 954,215.44
    5010101 48423699.30

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: extract numbers from alphanumeric text string if 1st tier not available

    text number is
    =TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",25)),20))
    to get a real number
    =TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",25)),20))+0
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: extract numbers from alphanumeric text string if 1st tier not available

    see if this is what you want...
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  4. #4
    Registered User
    Join Date
    03-24-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: extract numbers from alphanumeric text string if 1st tier not available

    Thanks Ice! It worked perfectly except on this line item :1010100 · Cash and cash equivalents:Petty Cash
    where resulted in #N/A. Can you guide me how to decipher formula so I can apply to similar situations in future? Thanks a million!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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