+ Reply to Thread
Results 1 to 3 of 3

Extract Numbers Only from cell

  1. #1
    Registered User
    Join Date
    11-14-2008
    Location
    Brooklyn, NY, USA
    Posts
    53

    Question Extract Numbers Only from cell

    Hi All,
    I have a data set that I imported from Access. One of the columns contains the code for specific work activities, for example 13Z or 9A. I need to extract the numbers only from the cells in that column so that they are in separate cells in a separate column. I've been trying to use left, right, or mid functions, as well as text to columns with varying degrees of success. Any ideas on what the best method for doing this may be?

    Thanks in advance!
    Last edited by judasdac; 05-06-2009 at 10:55 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Extract Numbers Only from cell

    Assuming as per your examples that the numbers always precede the alpha characters and there is only one number within the string then

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

    Where A1 holds the string 13Z etc... adjust ranges to suit.

  3. #3
    Registered User
    Join Date
    11-14-2008
    Location
    Brooklyn, NY, USA
    Posts
    53

    Thumbs up Re: Extract Numbers Only from cell

    Beautiful! Just what I needed. Thanks so much for the help!

    Cheers

+ 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