+ Reply to Thread
Results 1 to 7 of 7

Pull just numbers out of text

  1. #1
    Registered User
    Join Date
    08-18-2009
    Location
    Cincinnati
    MS-Off Ver
    Excel 2007
    Posts
    96

    Pull just numbers out of text

    I have a list of model numbers. They start with text, have numbers, then end sometimes with, sometimes without more text.

    Can you help write a formula that pulls just the numbers out?

    Model Need just Number
    MF1225H 1225


    Thanks much,
    Attached Files Attached Files
    Last edited by bluerog; 02-09-2012 at 02:37 PM.

  2. #2
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Pull just numbers out of text

    In H4
    =-LOOKUP(2,-RIGHT(LEFT(F4,LOOKUP(1E+100,--MID(F4,ROW($1:$100),1),ROW($1:$100))),{1,2,3,4,5,6,7,8,9}))
    and copy down.
    Good luck.

  3. #3
    Registered User
    Join Date
    08-18-2009
    Location
    Cincinnati
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: Pull just numbers out of text

    Works like a charm. Thanks OnError!

  4. #4
    Registered User
    Join Date
    02-23-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Pull just numbers out of text

    I am trying to do something similar and the above formula (mostly) works. The one problem I am having is when there is a field that does not contain a number I get a #N/A error. Is there a way around that? I've attached an example. In B2, if there is not a discount I would like it to just return the B1 value.

    Thanks!
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-23-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Pull just numbers out of text

    If I'm doing this right (possibly I'm not, this is new to me), I am getting an error in B2 of #VALUE!.

  6. #6
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Pull just numbers out of text

    I've looked at the workbook. You just want:
    =IF(ISNA(F2),B1,B1-(B1*(F2/100)))
    in B2

  7. #7
    Registered User
    Join Date
    02-23-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Pull just numbers out of text

    Thanks, that works!

+ 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