+ Reply to Thread
Results 1 to 7 of 7

Pull first numeric characters

  1. #1
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Pull first numeric characters

    I have this on a1 and a2

    078ABR39
    1096DGN41

    I want result

    078
    1096

    I know the LEFT(A1,3) and LEFT (A1,4)
    but i don't to waste time edit where applicable

  2. #2
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Pull first numeric characters

    Formula on B1 to drag down

  3. #3
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Pull first numeric characters

    B1=LEFT(A1,MATCH(FALSE,ISNUMBER(1*MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-1) use ctrl+Shift+Enter.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  4. #4
    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,145

    Re: Pull first numeric characters

    A non-array alternative

    =LOOKUP(99^9,LEFT(A2,ROW($1:$10))+0,LEFT(A2,ROW($1:$10)))

    if you have VERY long (>10 character) numbers, increase the $10 in the above to whatever you need
    Last edited by Glenn Kennedy; 09-09-2015 at 02:14 AM.
    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

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Pull first numeric characters

    Quote Originally Posted by Glenn Kennedy View Post
    A non-array alternative

    =LOOKUP(99^9,LEFT(A2,ROW($1:$10))+0,LEFT(A2,ROW($1:$10)))
    But one which is not so rigorous. For example, with:

    07APR399

    in A2, your formula - given the appropriate language/date settings - returns:

    07APR39

    not 07, as desired.

    Regards
    Last edited by XOR LX; 09-09-2015 at 02:17 AM.
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Pull first numeric characters

    Thank you works , picked the array as Glenn yours works for first 2 rows on the following data

    078ABR39
    078AC39
    0988BR36
    0988BR37
    0988BR38
    0988BR39
    0988BR40
    0988C36
    0988C37

  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: Pull first numeric characters

    Here's another one.

    Data Range
    A
    B
    1
    078ABR39
    078
    2
    078AC39
    078
    3
    0988BR36
    0988
    4
    0988BR37
    0988
    5
    0988BR38
    0988
    6
    0988BR39
    0988
    7
    0988BR40
    0988
    8
    0988C36
    0988
    9
    0988C37
    0988


    This formula entered in B1 and copied down:

    =LEFT(A1,SUMPRODUCT(--ISNUMBER(-MID(A1,ROW(INDIRECT("1:5")),1))))

    Assumes the longest number string is 5 digits. If it might be longer then adjust this portion of the formula to suit:

    INDIRECT("1:5")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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] VBA Code for Textbox: First 3 characters Alphabets next 3 characters numeric
    By honger in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-11-2013, 01:05 AM
  2. [SOLVED] Pull numeric value from text string.
    By Sam Capricci in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-05-2013, 02:03 PM
  3. Pull out a part of numeric cell
    By Anibha Jain in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-01-2013, 11:06 PM
  4. [SOLVED] Sum of numeric values within cells also containing non-numeric characters
    By Mike Brewer in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 04-24-2013, 09:16 AM
  5. Catch non-numeric characters
    By PerdixDaedalus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-12-2013, 04:50 AM
  6. How do I pull just the numeric characters in a cell?
    By punter in forum Excel General
    Replies: 4
    Last Post: 08-01-2006, 04:49 PM
  7. Removing Non-Numeric Characters
    By GlenS in forum Excel General
    Replies: 5
    Last Post: 10-12-2005, 06:05 AM
  8. Converting numeric characters
    By Demmaus in forum Excel General
    Replies: 2
    Last Post: 07-15-2005, 07:05 PM

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