+ Reply to Thread
Results 1 to 7 of 7

Seperating numbers and text

  1. #1
    Forum Contributor
    Join Date
    10-15-2013
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    218

    Seperating numbers and text

    Hello,

    I have an answer key to some multiple-choice practice questions and I'm trying split up the answers from the numbers.

    For example here is my string in text (in one line):

    1e, 2c, 3a, 4e, 5d, 6e, 7a, 8b, 9d, 10a

    I would like the data to show in two columns:

    1 e
    2 c
    3 a
    4 e
    5 d
    6 e
    7 a
    8 b
    9 d
    10 a

    I would do this manually but there are about 5000 questions. A formula that would split them out would be greatly appreciated.

    Thanks,

    Jason

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Seperating numbers and text

    how do they progress? first you can take the group and remove spaces, then using text to columns with delimited and comma as a separator you can put each in its own cell. But you note that you have about 5000 questions, are they like 10a, 100a, 1000a etc? or do they repeat with the numbers?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Contributor
    Join Date
    10-15-2013
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    218

    Re: Seperating numbers and text

    Quote Originally Posted by Sambo kid View Post
    how do they progress? first you can take the group and remove spaces, then using text to columns with delimited and comma as a separator you can put each in its own cell. But you note that you have about 5000 questions, are they like 10a, 100a, 1000a etc? or do they repeat with the numbers?
    The numbers repeat. For example:

    "Old Questions: 1e, 2c, 3a, 4e, 5d, 6e, 7a, 8b, 9d, 10a. New Questions: 1d, 2a, 3f, 4e, 5c, 6a, 7c, 8c, 9b, 10a. Next Topic: 1c, 2v, 3c, 4d, 5d, 6d, 7a, 8c, 9a, 10a..."

    It goes on and on like a sting of code. That's why I would like to separate it out so I can reference sections at a time without searching the whole line for the question that I am on.
    Last edited by JasonNeedsHelp; 12-04-2016 at 08:36 PM.

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Seperating numbers and text

    what I would do is, if they are all in row 1, use find and replace, find " " (a space) and replace (leave blank) then hit replace. this will get rid of all the spaces (if there are any). then use the text to columns function and get them all into their own cells going across row 1. If there are 5000 or so of them you have over 16000 columns if you are using excel 2007 or later. Then highlight the row and hit copy, then move down a row and hit paste special transpose and they will now be vertical in your column. Then use this formula in B2 across from your first value... =LEFT(A2,(LEN(A2)-1)) and copy down. Then in column C (cell C2) this =RIGHT(A2,1) and copy down.

  5. #5
    Forum Contributor
    Join Date
    10-15-2013
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    218

    Re: Seperating numbers and text

    Trying it now... but stuck on what you do you mean by "then use the text to columns function" ?

  6. #6
    Forum Contributor
    Join Date
    10-15-2013
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    218

    Re: Seperating numbers and text

    Nevermind, I did your steps and replaced "." & "," & ":" with tab and got it to split. Then your formula's worked perfectly in splitting it out.

    =LEFT(A2,(LEN(A2)-1))

    =RIGHT(A2,1)

    Thanks a ton!!!

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Seperating numbers and text

    under the data tab in excel is a function called text to columns. You may not need it as I reread your first post. You said that those values were in one line. If they are in one cell then you need that function, if they are spread out over the columns across row 1 then you don't need it. So I'm not sure. Either way, once you separate the values (or if they are separated already) then highlight the row and use copy then move down to the next cell and paste >> special >> transpose and they will all be in one column. Then use those two formulas and your results will be in columns B and C.

    EDIT: I was typing my post when you wrote it worked.

    Glad I could help.
    AND, thank you for the rep!

+ 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. [SOLVED] IF function for seperating Numbers
    By RickSmith in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-15-2015, 06:48 PM
  2. [SOLVED] Text To Columns: Seperating numbers from character-strings
    By cryptoknight in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-10-2014, 10:09 AM
  3. seperating numbers into different columns
    By newbee2013 in forum Excel General
    Replies: 3
    Last Post: 09-21-2013, 04:15 PM
  4. [SOLVED] Seperating numbers from text
    By oneeasygeezer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-16-2013, 09:13 AM
  5. Seperating text from numbers
    By dai534071 in forum Excel General
    Replies: 2
    Last Post: 11-26-2012, 10:34 AM
  6. Seperating Text from Numbers in a cell
    By maryjdelo in forum Excel General
    Replies: 10
    Last Post: 09-01-2009, 11:39 AM
  7. Seperating out social secuity numbers
    By HCA in forum Excel General
    Replies: 4
    Last Post: 09-21-2005, 02:27 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