+ Reply to Thread
Results 1 to 4 of 4

Extract a number out of string

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    142

    Extract a number out of string

    I'm trying to find a way to extract a number out of some strings. I only need the number to the left of ct. I used the following code that works but not for numbers above 99.

    Please Login or Register  to view this content.
    Example strings:

    1/8 inch bolts 20ct
    1/8 inch bolds 60ct
    1/8 inch bolts 100ct

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Extract a number out of string

    Something like below.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extract a number out of string

    Or this
    Enter formula in C1 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v B C
    1 1/8 inch bolts 20ct 20
    2 1/8 inch bolds 60ct 60
    3 1/8 inch bolts 100ct 100
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Extract a number out of string

    formula array CSE
    =MAX(IFERROR(--RIGHT(LEFT(A1,FIND("ct",A1)-1),ROW($1:$10)),0))

+ 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. [SOLVED] Extract certain number from string
    By Jacc in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-17-2018, 04:11 AM
  2. VBA to Extract number in string
    By vijayarc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2018, 06:13 PM
  3. Extract number from string
    By SharpL in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-16-2017, 08:34 AM
  4. [SOLVED] Extract number from string and add zero
    By Jacc in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-17-2017, 07:26 AM
  5. [SOLVED] How to Extract A Number from String if Text within the String Equals XYZ
    By tyrsfury in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-15-2012, 03:30 PM
  6. [SOLVED] Extract a mainly numeric string (ISSN number) from an arbitrary string
    By Buzzed Aldrin in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-04-2012, 01:49 PM
  7. Extract Only Number From A String
    By lehainam in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-26-2006, 06:45 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