+ Reply to Thread
Results 1 to 4 of 4

Moving data from columns to rows

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    Sunshine Coast
    MS-Off Ver
    Excel
    Posts
    2

    Moving data from columns to rows

    Hi all,

    I'm hoping someone will have the answer to this question. I have a spreadsheet with over 8000 rows of data. One of the column headings is Unit and the other is Result. Obviously all the data runs vertically down the sheet. I need to take these columns and somehow move them into a new spreadsheet HORIZONTALLY in rows not columns...

    Is there anyway of doing this???

    example - Current view

    Name Unit Result
    Joe 1 Pass
    Joe 2 Fail
    Joe 3 Pass


    I need it to look like this

    Name Unit Result Unit Result Unit Result etc
    Joe 1 Pass 2 Fail 3 Pass

    Looking forward to hearing of any solutions to this problem~!

    Thanks,
    Jodie

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,811

    Re: Moving data from columns to rows

    It's getting a bit late here, so I can't devote the time to fully answer your problem, but have a look at post #7 in this thread from earlier:

    http://www.excelforum.com/excel-gene...readsheet.html

    It does a similar job to what you want (though I expect you would want to match on the name and could have a variable number of unit/result pairs).

    Anyway, it might give you some ideas.

    Hope this helps.

    Pete

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

    Re: Moving data from columns to rows

    'COLUMNS TO ROWS
    Here's a macro for merging columns of data to one row matching for column A. There's a sample workbook too you could drop your data into and test it out.
    The macro is called CONSOLIDATE and on sheet Part 2, if you drop your 3 columns of data into that sheet and run the macro you'll get the exact result you've stated.
    Last edited by JBeaucaire; 12-27-2019 at 10:41 PM.
    _________________
    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!)

  4. #4
    Registered User
    Join Date
    10-30-2012
    Location
    Sunshine Coast
    MS-Off Ver
    Excel
    Posts
    2

    Re: Moving data from columns to rows

    Hi Pete and Jerry,

    Thank you for your replies! I have tested your formula Pete and can't seem to get it to work... (keep in mind that I'm not great with Excel!) Jerry, I wasn't sure how to add and run the macro data from your link, sorry!

    I have taken a snapshot of the spreadsheet I'm working on and the column headings that I need the data to move into. Hope this might give you a better idea of what I'm trying to achieve.ExcelCapture.PNG

    As you will see each student completes 15 or 16 units (with associated results). I need to move this data from the columns into one row for each student.

    thanks again, I really appreciate your help!

+ 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