+ Reply to Thread
Results 1 to 12 of 12

Take Headers And Move To Columns

  1. #1
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    Take Headers And Move To Columns

    Hi - i have a workbook that has headers that contains ALL possible catolog items. Then each student has 1 row and the quantity ordered is placed in the corresponding row under the header.

    I need to format this so that each student has one row for each item ordered.

    Attached is a sample workbook showing my current format, and my desired format.

    Please forgive ignorance as the catolog item names span from column L - BV in the prod workbook not just 10 items like shown in this sample.
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Take Headers And Move To Columns

    Your sample workbook is confusing. Which is the input data, which is the output data, what's the transformation logic? There are no headers - which columns represent students, which represent items, and what are the others??

    Please upload a sample workbook which actually represents your real data - anonymize the data, and reduce it to a small sample, but don't change the layout / structure of the data.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    Re: Take Headers And Move To Columns

    Quote Originally Posted by Olly View Post
    Your sample workbook is confusing. Which is the input data, which is the output data, what's the transformation logic? There are no headers - which columns represent students, which represent items, and what are the others??

    Please upload a sample workbook which actually represents your real data - anonymize the data, and reduce it to a small sample, but don't change the layout / structure of the data.
    My mistake...after reading your response I realize I uploaded the wrong workbook!!!! Please take a look at this one that should fully illustrate things.
    Attached Files Attached Files

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Take Headers And Move To Columns

    That makes more sense!

    This is trivial, using Power Query. Format your source data as a table, then use:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Take Headers And Move To Columns

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    Re: Take Headers And Move To Columns

    Quote Originally Posted by Olly View Post
    That makes more sense!

    This is trivial, using Power Query. Format your source data as a table, then use:

    Please Login or Register  to view this content.

    I do not understand...what you are asking me to do?

  7. #7
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    Re: Take Headers And Move To Columns

    Quote Originally Posted by jindon View Post
    Please Login or Register  to view this content.
    Hi - this works with my sample workbook, but in my production workbook the student name is in column B, and the items are in columns L - BV.

    How could this be modified to work for that requirement?

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Take Headers And Move To Columns

    It is completely depends on how the data structured, so upload your workbook.

  9. #9
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    Re: Take Headers And Move To Columns

    Quote Originally Posted by jindon View Post
    It is completely depends on how the data structured, so upload your workbook.
    The data in the other columns does not matter - but this is how the production workbook is set-up. BTW - thank you!
    Attached Files Attached Files

  10. #10
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,443

    Re: Take Headers And Move To Columns

    Administrative Note:

    Please don't quote entire posts unnecessarily. They are just clutter and make threads hard to read.
    Use the "Quick reply" instead
    Thanks

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Take Headers And Move To Columns

    No one will understand what you want unless we actually see your workbook...
    Please Login or Register  to view this content.

  12. #12
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Take Headers And Move To Columns

    Quote Originally Posted by jo15765 View Post
    I do not understand...what you are asking me to do?
    Use Power Query.

    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.

+ 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. VBA to move column headers to rows
    By SL1104 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-23-2018, 03:19 PM
  2. [SOLVED] dynamic vba code to delete duplicate headers, blank headers and blank columns
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-14-2017, 02:27 PM
  3. Move data based on their headers to mater
    By Tortus in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-08-2015, 02:40 PM
  4. Move column headers to row
    By tina1029 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-27-2015, 09:58 AM
  5. Replies: 4
    Last Post: 02-08-2014, 02:31 PM
  6. Macro to move Headers to the next print Page.
    By awagenhurst in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2013, 03:55 PM
  7. Move Data and Create Headers
    By myjebay1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2011, 08:21 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