+ Reply to Thread
Results 1 to 5 of 5

Separating a column by numbers vs. letters when numbers are at the end of the cells?

Hybrid View

  1. #1
    Registered User
    Join Date
    03-26-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Separating a column by numbers vs. letters when numbers are at the end of the cells?

    I'd like to separate a column based on numbers vs. letters, where the numbers are at the end of the cells. For instance the following lists some Super Bowl scores, and an example score:
    New York Giants 1000	New England Patriots -250
    Green Bay Packers 31	Pittsburgh Steelers 25
    New Orleans Saints 31	Indianapolis Colts 17
    Pittsburgh Steelers 27	Arizona Cardinals 23
    New York Giants 17	New England Patriots 14
    Indianapolis Colts 29	Chicago Bears 17
    Baltimore Ravens 34	New York Giants 7
    Here there are two columns, one with the winner and the other with the loser. I'd like to separate this into 4 columns - one with the winner's name, the second column with the winner's points, the third column with the loser's name, and the fourth column with the loser's points.

    The issues are that the winner/loser names have variable lengths and word counts (some have two words like "Baltimore Ravens", others have three like "New York Giants"), and also the points scored can be an arbitrary number of digits (1 digit, 2 digits, 3 digits, 4 digits, etc.) and in theory can also be negative. So I can't simply use the formula:
    =RIGHT(A1,2)
    To separate the numerical values, since they might be an arbitrary number of digits. Likewise I can't use the following formula to get the team name:
    =LEFT(A1,LEN(A1)-3)
    How can I accomplish this task of separating these two columns into four columns, where the numerical values have their own columns? The result I'd like to achieve is four columns that look like this:
    New York Giants		1000	New England Patriots	-250
    Green Bay Packers	31	Pittsburgh Steelers	25
    New Orleans Saints	31	Indianapolis Colts	17
    Pittsburgh Steelers	27	Arizona Cardinals	23
    New York Giants		17	New England Patriots	14
    Indianapolis Colts	29	Chicago Bears		17
    Baltimore Ravens	34	New York Giants		7
    Last edited by Skywalker; 02-04-2012 at 03:00 PM.

  2. #2
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Separating a column by numbers vs. letters when numbers are at the end of the cel

    Under data tab > go to text to columns > then used fixed width. All split into nice columns for you.

  3. #3
    Registered User
    Join Date
    03-26-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Separating a column by numbers vs. letters when numbers are at the end of the cel

    Thanks Fotis1991! That looks like a pretty good solution
    Quote Originally Posted by darknation144 View Post
    Under data tab > go to text to columns > then used fixed width. All split into nice columns for you.
    The columns are not fixed width so unfortunately this cannot work.

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Separating a column by numbers vs. letters when numbers are at the end of the cel

    Hi

    This is a way to do this.

    For separate the text, use this function.

    =LEFT(A1;MATCH(1;ISNUMBER(MID(A1;COLUMN($1:$1);1)*1)*1;0)-1)

    Array formula(CSE)

    For separate numbers, use this.

    =LOOKUP(9^9;1*RIGHT(TRIM(A1);COLUMN($2:$2)))

    Hope to helps you.
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

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

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Separating a column by numbers vs. letters when numbers are at the end of the cel

    You are welcome!

    So pls, mark your thread, as solved.

+ 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