+ Reply to Thread
Results 1 to 5 of 5

extracting numbers with the same word in diferrent position

  1. #1
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    extracting numbers with the same word in diferrent position

    wahhhh! need help from you guys, almost done with my new payoff worksheet and then this small bug appears and my excitement like "poof"(gone)!.



    with this code --> =if(search("ins",i27,),LOOKUP(99^99,--("0"&MID(I27,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},I27&"0123456789")),ROW($1:$10000))))+0

    i can get the value if the word contains "ins" like this --> "Ins 723.00" return 723.00 which is correct, and then i've encountered a word which is like"723.00 Ins", and martin gave me the code to get from both sides which is this one --> =IF(ISNUMBER(SEARCH("Ins",A1)),LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),ROW($1:$10000))))+0,"") . Work perfectly. and my big problem is that the word Ins 723.00 means Insurance and the 723.00 means Inspection, so it means they're different. and it means I cant use martin's code with this.

    So is there any way i can get only the value if the word Ins is in the right side of the amount and also the code if the value is in the left side of the amount. I need two formula for this. Thanks guys!!
    Last edited by darkhangelsk; 08-16-2009 at 07:45 AM.

  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: extracting numbers with the same word in diferrent position

    give a few sample strings and what you want from each string
    "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 Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Re: extracting numbers with the same word in diferrent position

    Okay, this is the sample...
    Attached Files Attached Files

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

    Re: extracting numbers with the same word in diferrent position

    for ins (inspect)
    =IF(AND(ISNUMBER(SEARCH("ins",A2)),NOT(ISNUMBER(SEARCH("insp",A2)))),LOOKUP(99^99,--("0"&MID(A2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")),ROW($1:$10000))))+0,"")

  5. #5
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Re: extracting numbers with the same word in diferrent position

    and how come you know this and i dont?, (just kidding!).. Thanks Martin! you're an angel!








    PS
    wew, i'm giving you something, but it says try to spread it first, lolz...

+ 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