+ Reply to Thread
Results 1 to 11 of 11

How to Display Numbers Only OR How To Extract Numbers In A Cell

  1. #1
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    157

    How to Display Numbers Only OR How To Extract Numbers In A Cell

    In cells A1, B1, C1 I have codes like P30K, 36L, P38WT.,

    I am looking to find the sum of the #s in each cell. (104)

    What is the easiest way to do this. Note Sometimes there are 2 letters before or after the Number, sometimes there is one, or none.

    Thanks
    Last edited by PaddyP; 08-17-2016 at 11:49 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: How to Display Numbers Only OR How To Extract Numbers In A Cell

    There are lots of ways to do this. here's one:

    =LOOKUP(99^99,--(0&MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&1234567890)),ROW(INDIRECT("1:"&LEN(A1)+1)))))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to Display Numbers Only OR How To Extract Numbers In A Cell

    Is it always a 2 digit number or will it vary?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    157

    Re: How to Display Numbers Only OR How To Extract Numbers In A Cell

    Thank you Glenn!

    Always 2 digit Tony.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: How to Display Numbers Only OR How To Extract Numbers In A Cell

    If there are only ever 2...

    =LOOKUP(99^99,--(0&MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&1234567890)),2)))

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: How to Display Numbers Only OR How To Extract Numbers In A Cell

    Glad to have helped...

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to Display Numbers Only OR How To Extract Numbers In A Cell

    Quote Originally Posted by PaddyP View Post
    Always 2 digit
    Like this...

    Data Range
    A
    B
    C
    D
    1
    P30K
    36L
    P38WT
    2
    30
    36
    38
    104


    This formula entered in A2 and copied across...

    =--MID(A1,MIN(FIND({1,2,3,4,5,6,7,8,9,0},A1&1234567890)),2)

    Then you can do a SUM in D2...

    =SUM(A2:C2)
    Last edited by Tony Valko; 08-17-2016 at 12:00 PM.

  8. #8
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    157

    Re: How to Display Numbers Only OR How To Extract Numbers In A Cell

    Thanks Tony that is also a great way to do it!

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to Display Numbers Only OR How To Extract Numbers In A Cell

    You're welcome. Thanks for the feedback!

  10. #10
    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: How to Display Numbers Only OR How To Extract Numbers In A Cell

    or this!
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D E F
    1 P30K 36L P38WT 30 36 38
    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

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: How to Display Numbers Only OR How To Extract Numbers In A Cell

    You're making an assumption that these are clothing sizes and that the first digit will never exceed 5?? Even in the USA???

+ 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: 12-17-2015, 12:33 AM
  2. [SOLVED] Compare two cells with comma delimited numbers and display the numbers that are NOT duplic
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2014, 02:22 PM
  3. [SOLVED] extract or display bill numbers against particuler item
    By keshavtale in forum Excel General
    Replies: 9
    Last Post: 10-21-2014, 03:26 AM
  4. Replies: 2
    Last Post: 05-02-2006, 11:20 AM
  5. Extract numbers from cell with Text and Numbers
    By wiredwrx in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-18-2006, 06:00 PM
  6. [SOLVED] How do I extract numbers from a cell with both text and numbers?
    By SHANNON in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-01-2005, 10:35 PM
  7. [SOLVED] extract numbers from cell containing text & numbers
    By [email protected] in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-14-2005, 03:10 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