+ Reply to Thread
Results 1 to 3 of 3

extract numbers with specific text from right or left

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

    extract numbers with specific text from right or left

    wew, i'm doing our payoff right now, (dat's why doing some overtym in our home) and encounter this problem of mine,


    i use this code to get the value from the cell that contains "Ink"., and i got the codes from reading other problems:

    =IF(SEARCH("Ink",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

    like this in a1 -> Ink 253.00

    and totally working! but the problem is if the word "ink" in the left of the value --> 253.00 ink and the result is #NA, is there any way that i can get the value whether the word Ink is in the left side or right side of the value?

    also bothered why is it if the word is not "ink" in the cell and return -> #value since i put ("") in the last part of If function(value if false)?
    Last edited by darkhangelsk; 08-15-2009 at 02:39 PM.

  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 with specific text from right or left

    =IF(ISNUMBER(SEARCH("Ink",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,"")
    works either way for me.
    "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: extract numbers with specific text from right or left

    so the missing link is the "isnumber", i also found out that i can use iferror function if i dont want to see the #value.


    Again Martin, you're the best!

    Thanks!!

+ 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