+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Sorting Rows of data into one column

  1. #1
    Registered User
    Join Date
    03-08-2010
    Location
    New York, US
    MS-Off Ver
    Excel 2010
    Posts
    25

    Sorting Rows of data into one column

    Hi all-

    I have spreadsheet that I need help sorting my data a certain way. Please look at the attached sheet and see if you can help me. I need to do this for a thousand or so people. I can't simply cut paste and transpose...I'd be here forever. Any quick way?

    Thanks,

    Mike Example.xlsx

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    re: Sorting Rows of data into one column

    Using VBA:
    Please Login or Register  to view this content.

    How/Where to install the macro:

    1. Open up your workbook
    2. Get into VB Editor (Press Alt+F11)
    3. Insert a new module (Insert > Module)
    4. Copy and Paste in your code (given above)
    5. Get out of VBA (Press Alt+Q)
    6. Save as a macro-enabled workbook

    The macro is installed and ready to use. Press Alt-F8 and select it from the macro list.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-08-2010
    Location
    New York, US
    MS-Off Ver
    Excel 2010
    Posts
    25

    re: Sorting Rows of data into one column

    Thanks a lot for helping me...

    I don't know if I'm running the macro right or I just gave you a bad example. Can you look at the new sheet I'm posting? For some reason I couldn't get your macro to work. Am I suppose to highlight anything before i run the macro? I'm a newb when it comes to these things. Again, thanks for your time. I really appreciate it.

    Mike Example2.xlsx

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    re: Sorting Rows of data into one column

    Yes, you're first example was not good reflection. You showed one column of data to repeat at the start and you needed two.

    Remove all the blank rows so your data table sits at the top left of the sheet. Blanks just complicate the macro unnecessarily.

    I've added a line for FIRSTCOL at the top where you can set the first column to transpose, column 3 in this instance. This will let you use this macro for any set of data no matter how many columns at the beginning should not be transposed.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-08-2010
    Location
    New York, US
    MS-Off Ver
    Excel 2010
    Posts
    25

    Thumbs up Re: Sorting Rows of data into one column

    Seems to work like a charm....thanks a million. You saved me a ton of time!

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting Rows of data into one column

    Be sure to check out my site (link in my signature)...it has lots of code snippets and macros to help, maybe you'll find more of use there.

    ===
    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to 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