+ Reply to Thread
Results 1 to 8 of 8

Solved: Selecting Definite Number of Characters in a Cell

  1. #1
    Registered User
    Join Date
    03-20-2009
    Location
    Des Moines, IA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Solved: Selecting Definite Number of Characters in a Cell

    I have a description for a couple trucks in my inventory, rather than retyping all the mileage, I would like to select the miles out of the description.

    Example:
    14.0 Detroit 515 HP, 10 Spd OD, Engine Brake, Air Ride Suspension, 3.42 Ratio, 234" WB, 70" Double Deck Condo, 22.5LP Tires, Aluminum/Steel Wheels, Tandem Axle, 12,000# FA, 40,000# RA, 259,000 Miles

    I have tried the find, left and mid formulas but haven't put something together to work just right. I would like to select the 7 characters to the left of "Miles".

    Does anyone have any ideas?
    Last edited by clawrence04; 03-26-2009 at 02:56 PM. Reason: Solved

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Selecting Definite Number of Characters in a Cell

    If you text string is in A1, try:

    Please Login or Register  to view this content.
    replace A1 as required and copy down and format cell to number with 1000s separator

    This should work even if the mileage is not 7 digits long.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-20-2009
    Location
    Des Moines, IA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Selecting Definite Number of Characters in a Cell

    Awesome, that works great for the descriptions with mileage listed at the end of the blurb; however, I have a hand full of descriptions where the mileage is nestled in the middle and its rendering a #value error. Any more ideas?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Selecting Definite Number of Characters in a Cell

    Try

    Please Login or Register  to view this content.

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Selecting Definite Number of Characters in a Cell

    Try this:
    Please Login or Register  to view this content.
    If A1 contains: 259,123 miles, engine brake
    ...the formula returns: 259123

    If A1 contains: Engine brake, 259,123 miles, something else
    ...the formula returns: 259123

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Selecting Definite Number of Characters in a Cell

    My formula made the assumption that the mileage may not always be 7 chars long....

  7. #7
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Selecting Definite Number of Characters in a Cell

    The formula I posted does have its limits.
    It only works from 10,000 through 999,999.

    This variation covers from 10 through 9,999,999

    Please Login or Register  to view this content.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Selecting Definite Number of Characters in a Cell

    Cool... mine covers from 0 to 9.99999999999e+307

+ 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