+ Reply to Thread
Results 1 to 4 of 4

Sorting into multiple columns if 3rd digit is letter or number

  1. #1
    Registered User
    Join Date
    02-05-2015
    Location
    Saginaw, Michigan
    MS-Off Ver
    2010
    Posts
    2

    Sorting into multiple columns if 3rd digit is letter or number

    I have to split a number into multiple columns. The value of the column depends on its position in the original number.

    Examples:
    69B2:

    69 - Relates to an error, is always the first two digits. Need in 1st column. (I can get this one with LEFT() or MID() function.)
    B - Can be in 3rd or 4th position. It's a time stamp. Need it in 2nd column.
    2 - If it's in the 4th position, like this one, it's a 12. It refers to a location. Need it in the 3rd column.

    892A:

    89 - Different error, but still same position. (I can get this part)
    2 - With a number in the 3rd position, like this, it's a 2. Put into 3rd column
    A - Can be in 3rd or 4th position. Timestamp. Put into 2nd column


    The original column can have lots of combinations:
    89C0
    89B3
    89B1
    89A0
    898B
    898B

    I'd like a result like:

    [Error] [Time] [Location]


    I've tried using:
    Please Login or Register  to view this content.
    If the 3rd digit is a number, then use it, otherwise use the 4th digit and add 10.

    Thanks

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Sorting into multiple columns if 3rd digit is letter or number

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

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

    location column:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Arkadi; 02-05-2015 at 03:46 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    02-05-2015
    Location
    Saginaw, Michigan
    MS-Off Ver
    2010
    Posts
    2

    Re: Sorting into multiple columns if 3rd digit is letter or number

    Looks like that got it. I was just missing the VALUE function.

    Thank You.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Sorting into multiple columns if 3rd digit is letter or number

    You're welcome. Yes sometimes excel is funny about numbers, especially extracted from text. By checking if value is a number instead of just the character, you avoid that issue

    And thanks for the rep!
    Last edited by Arkadi; 02-05-2015 at 03:52 PM.

+ 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. Sorting multiple columns/requests to find number of days
    By awsachsen in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-14-2014, 05:50 PM
  2. Replies: 5
    Last Post: 12-28-2013, 08:59 AM
  3. [SOLVED] Sorting of a Log Number that starts with a two digit year
    By xltbob in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-19-2012, 05:34 PM
  4. Sorting number/letter combos
    By DADSCOOL2 in forum Excel General
    Replies: 2
    Last Post: 03-13-2009, 12:48 AM
  5. Sorting a six digit number by terminal digit
    By Brian in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-11-2006, 01:55 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