+ Reply to Thread
Results 1 to 5 of 5

[SOLVED] Extract the first 3 numbers in a cell

  1. #1
    Registered User
    Join Date
    03-24-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    2

    [SOLVED] Extract the first 3 numbers in a cell

    Hello, I have a list of dimensions in an excel column and I need to extract the first 3 numbers in each of the rows.

    For example, I have this in one of the cells
    *** 21"W x 24"D x 31.5"H or 26.5" W x 22" D x 29" H, Seat Height: 19"

    I want 21 in a new column, 24 in another new column, and 26.5 in a third new column. There is no standard to the way the dimensions are listed as you see with the other examples below.

    Other examples of listed dimensions.
    H30 x W79 x D39.5
    48"l x 17.5"w x 38"h
    H:24" W:54" D:28"
    12x12x24

    Is there a way to do this without manually going to 5000+ lines? Thank you ahead of time.
    Last edited by bobkelso; 03-24-2012 at 01:54 PM.

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Extract the first 3 numbers in a cell

    Hi,

    if in A2 the string

    in B2 to get the first number

    Please Login or Register  to view this content.
    in C2 to get the second number

    Please Login or Register  to view this content.
    in D2 to get the third number
    Please Login or Register  to view this content.

    EDIT: testing the formula, if first two numbers are equal, formula does not work.
    Better in D2

    Please Login or Register  to view this content.
    Regards
    Attached Files Attached Files
    Last edited by canapone; 03-24-2012 at 12:33 PM. Reason: grammar
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Extract the first 3 numbers in a cell

    Hi there, give this function a shot and see if it is what you are looking for, if so i will write the other 2

    Please Login or Register  to view this content.
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  4. #4
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Extract the first 3 numbers in a cell

    so im apparently bored, try this for all 3, when using the function the first paramater is the string to parse, the second is what number you want (1,2,3)

    Please Login or Register  to view this content.
    if you need help using UDF's please let me know.

  5. #5
    Registered User
    Join Date
    03-24-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Extract the first 3 numbers in a cell

    You guys are quick and are geniuses! That will save me days of work! Thanks for the quick reply! Now the hard part is figuring out how to mark this solved....
    Last edited by bobkelso; 03-24-2012 at 01:52 PM.

+ 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