+ Reply to Thread
Results 1 to 9 of 9

EXtract ALphanumeric from text string

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

    EXtract ALphanumeric from text string

    I have the following text string.

    What formula can I use to extract these results on the right?
    Sample file.xlsx

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: EXtract ALphanumeric from text string

    You have no set of rule for extracting the text, so its quite difficult to come up with a formula to do that. It would be better if you explain the expected output to let us know that on what conditions you expect these outputs. Its clear for some but not for all.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Contributor
    Join Date
    11-12-2013
    Location
    Delhi
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: EXtract ALphanumeric from text string

    may be this can help............

    =LEFT(A2,FIND("·",A2,1)-1)

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

    Re: EXtract ALphanumeric from text string

    Hi sktneer,

    Thanks for the feedback. Bascially what I am looking for is to extract the last account number (sub account) of the text string.
    In this Text string: 613000 · Non Income Tax Expense:613005 · Property Tax Expense:613005A · Property Tax Expense (CS)

    It is viewed as such:-
    613000 · Non Income Tax Expense
    ∟ 613005 · Property Tax Expense
    ∟ 613005A · Property Tax Expense (CS)

    So 613005A is my expected result.

    Hope this clarifies.

  5. #5
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: EXtract ALphanumeric from text string

    This is clunky play, but FWIW ....
    Place in
    K2: =SEARCH(":",A2,L2+1)
    L2: =SEARCH(":",A2,M2+1)
    M2: =SEARCH(":",A2)
    N2: =INDEX(K2:M2,MATCH(TRUE,INDEX(K2:M2<>"#VALUE!",),0))
    O2: =MID(A2,N2+1,7)
    P2: =IF(ISNA(O2),LEFT(A2,7),O2)
    Q2: =IF(ISNUMBER(LEFT(P2)+0),P2,MID(A2,M2+1,7))
    Copy K2:Q2 down to Q13. Col Q seems to deliver the indicated results ....
    ---------------------------
    Any good? Wave it, click on the little star at the bottom left of my responses

  6. #6
    Forum Contributor
    Join Date
    11-12-2013
    Location
    Delhi
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: EXtract ALphanumeric from text string

    pls insert formula in l2 as randbetween(1,6) and in the k2 pls use formula as =IF(LEN(LEFT(A2,FIND("·",A2,1)-1))=7,LEFT(A2,FIND("·",A2,1)-1)&LOOKUP(L2,{1,2,3,4,5,6,7},{"A","B","C","D","E","F"}),IF(LEN(LEFT(A2,FIND("·",A2,1)-1))=8,LEFT(A2,FIND("·",A2,1)-1)," "))

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: EXtract ALphanumeric from text string

    Pl see attached file.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-10-2013
    Location
    Pomáz, Hungary
    MS-Off Ver
    Excel 2007
    Posts
    78

    Re: EXtract ALphanumeric from text string

    This formula gives the same result as your sample file (enter it with Shift-Ctrl-Enter):

    =TRIM(MID(A1,LEN(A1)-4-MATCH(TRUE,ISNUMBER(--MID(A1,LEN(A1)+1-ROW(INDIRECT("1:"&LEN(A1))),1)),0),7))

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

    Re: EXtract ALphanumeric from text string

    Thank you so much for the answers! Though I hope to understand one day how to decode it so that I can accommodate amendments if required.

+ 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. Replies: 4
    Last Post: 08-05-2013, 07:27 AM
  2. extract numbers from alphanumeric text string if 1st tier not available
    By Ellice16 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-25-2013, 01:52 AM
  3. Extract Alphanumeric string from a cell
    By kenny.fsw in forum Excel General
    Replies: 1
    Last Post: 06-12-2012, 04:36 AM
  4. [SOLVED] VBA expression to extract the text from the beginning of an alphanumeric string
    By webfeet2 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-01-2012, 12:41 AM
  5. Extract word from alphanumeric string
    By sam sam in forum Excel General
    Replies: 4
    Last Post: 04-25-2012, 09:07 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