1. Welcome! Please take a few seconds to create your free account to post threads, make some friends, remove a few ads while surfing and much more. ClutchFans has been bringing fans together to talk Houston Sports since 1996. Join us!

MS Excel Question

Discussion in 'BBS Hangout' started by s land balla, Aug 27, 2009.

  1. s land balla

    s land balla Member

    Joined:
    Apr 24, 2001
    Messages:
    6,610
    Likes Received:
    365
    Here's the deal -

    I have a column of names. Some cells have one name only (ie, John Doe), whereas other cells have two names separated using Alt+Enter.

    There are a couple thousand rows in this column, and I was wondering what the best way would be to sort this column.

    I tried Googling this, but not luck.

    TIA.
     
  2. Jayou

    Jayou Member

    Joined:
    Jul 24, 2003
    Messages:
    485
    Likes Received:
    3
    Concatenate the separated names?

    I don't understand what you mean by they're separated with alt+enter. :confused:
     
  3. s land balla

    s land balla Member

    Joined:
    Apr 24, 2001
    Messages:
    6,610
    Likes Received:
    365
    There are two names in one cell, such as:

    John Doe
    Robert Jones

    Both of those names are in the same cell.
     
  4. Lil Pun

    Lil Pun Member

    Joined:
    Oct 6, 1999
    Messages:
    34,143
    Likes Received:
    1,038
    So there are some cells that have one name, ex. John Doe, but there some cells that have two names, ex. Jack Doe Jane Doe. Is that correct?
     
  5. TreeRollins

    TreeRollins Member

    Joined:
    Nov 7, 2006
    Messages:
    2,052
    Likes Received:
    102
    Data -> Text to columns -> Delimited->checkmark space -> keep it general and finish
     
    1 person likes this.
  6. s land balla

    s land balla Member

    Joined:
    Apr 24, 2001
    Messages:
    6,610
    Likes Received:
    365
    Yep. But instead of being typed out in a cell separated by a space (ie, Jack Doe Jane Doe), I used Alt+Enter so one name is directly under the other.

    ie,
    Jack Doe
    Jane Doe
     
  7. TreeRollins

    TreeRollins Member

    Joined:
    Nov 7, 2006
    Messages:
    2,052
    Likes Received:
    102
    Probably should elaborate... Select that column and then go to Data-->etc...

    Also when you checkmark space, make sure you uncheck everything else
     
  8. Jayou

    Jayou Member

    Joined:
    Jul 24, 2003
    Messages:
    485
    Likes Received:
    3
    I just tried that and end up only with John Doe. Robert Jones goes bye bye.
     
  9. s land balla

    s land balla Member

    Joined:
    Apr 24, 2001
    Messages:
    6,610
    Likes Received:
    365
    Awesome, thanks man. It seemed to work even if I didn't check 'space'.
     
  10. meggoleggo

    meggoleggo Member

    Joined:
    Aug 21, 2003
    Messages:
    4,402
    Likes Received:
    48
    Do you have the same sets of names coming up in these cells? Like, do you have John Doe/Robert Doe 27 times, or is each and every cell different?

    If you have the same sets coming up, you could auto filter for those instances, and manually separate them on one row, copy, paste, and replace for the rest of the instances, and then move on to the next filtering set.

    It might take a while longer than you are looking for, but it's better than going one by one...
     
  11. s land balla

    s land balla Member

    Joined:
    Apr 24, 2001
    Messages:
    6,610
    Likes Received:
    365
    Different names
     
  12. meggoleggo

    meggoleggo Member

    Joined:
    Aug 21, 2003
    Messages:
    4,402
    Likes Received:
    48
    Ouch. I got nothin. Sorry dude, good luck.
     
  13. Dr of Dunk

    Dr of Dunk Clutch Crew

    Joined:
    Aug 27, 1999
    Messages:
    46,648
    Likes Received:
    33,664
    That worked? Weird. I would think what would happen is what happened to Jayou and you'd lose data. Or at least that's what happened to me. :)
     
  14. s land balla

    s land balla Member

    Joined:
    Apr 24, 2001
    Messages:
    6,610
    Likes Received:
    365
    No worries, thanks for the help. TreeRollins advice seems to have worked perfectly.
     
  15. s land balla

    s land balla Member

    Joined:
    Apr 24, 2001
    Messages:
    6,610
    Likes Received:
    365

    Whoops, you're right..it seemed like it worked at first because of the massive amounts of data..but it did cut most of the data off.

    Any other suggestions?
     
  16. Jayou

    Jayou Member

    Joined:
    Jul 24, 2003
    Messages:
    485
    Likes Received:
    3
    Hey what version of Excel are you working with, Balla? I've got 2007 and Tree's trick with the text to columns made the second name disappear completely. I'm assuming you want to separate the 2nd name into a new cell.
     
  17. s land balla

    s land balla Member

    Joined:
    Apr 24, 2001
    Messages:
    6,610
    Likes Received:
    365
    Yeah, you're right. It didn't work for me either, I just thought it did at first (also using 2007).
     
  18. Dr of Dunk

    Dr of Dunk Clutch Crew

    Joined:
    Aug 27, 1999
    Messages:
    46,648
    Likes Received:
    33,664
    Use the SUBSTITUTE function to replace all instances of CHAR(10) in the column you want to split with some other character like a comma or a pipe character. Then do what TreeRollins did using the character you used to perform the split.


    *EDIT* : Had a typo in there... should be CHAR(10), not CHR(10).
     
    #18 Dr of Dunk, Aug 27, 2009
    Last edited: Aug 27, 2009
  19. ScriboErgoSum

    ScriboErgoSum Member
    Supporting Member

    Joined:
    Aug 5, 2002
    Messages:
    3,149
    Likes Received:
    387
    Highlight your data and click Format->Cells. Select the Alignment tab and uncheck Wrap Text. You technically don't need to do this, but it makes the data look cleaner.

    Now you need to figure out if you have a line break in your data or not. In an adjacent column paste in the following formula:

    =IF(ISERROR(FIND(CHAR(10),A1)),A1,TRIM(MID(A1,1,FIND(CHAR(10),A1)-1) & " "&MID(A1,FIND(CHAR(10),A1)+1,500 )))

    That takes a name in the cell A1 and spits it out in clean form, regardless of whether there is a line break or not.
     
  20. JuanValdez

    JuanValdez Member

    Joined:
    Feb 14, 1999
    Messages:
    35,071
    Likes Received:
    15,251
    Fire the genius whose idea it was to put multiple names in the same cell. Oh, that was you? :eek:
     

Share This Page

  • About ClutchFans

    Since 1996, ClutchFans has been loud and proud covering the Houston Rockets, helping set an industry standard for team fan sites. The forums have been a home for Houston sports fans as well as basketball fanatics around the globe.

  • Support ClutchFans!

    If you find that ClutchFans is a valuable resource for you, please consider becoming a Supporting Member. Supporting Members can upload photos and attachments directly to their posts, customize their user title and more. Gold Supporters see zero ads!


    Upgrade Now