How to convert rows of questions and answers to single row with columns












-1















I have an Excel 365 (2016) file that contains rows of questions/answers that I need converted to columns as shown below.



Sample Excel



Person  Question    Answer      
Bob Dogs Name Rover
Bob Cats Name Mewl
Bob Car Type Mustang
Bob Own/Rent Own
Carol Cats Name Tiger
Carol Car Type Ford
Carol Own/Rent Rent
Ted Own/Rent Own
Alice Dogs Name Growler
Alice Cats Name Cali
Alice Car Type GMC
Alice Own/Rent Own


Dogs Name Cats Name Car Type Own/Rent
Bob Rover Mewl Mustang Own
Carol Tiger Ford Rent
Ted Own
Alice Growler Cali GMC Own









share|improve this question

























  • This may be useful

    – cybernetic.nomad
    Feb 20 at 22:07











  • related

    – timotree
    Feb 20 at 22:48
















-1















I have an Excel 365 (2016) file that contains rows of questions/answers that I need converted to columns as shown below.



Sample Excel



Person  Question    Answer      
Bob Dogs Name Rover
Bob Cats Name Mewl
Bob Car Type Mustang
Bob Own/Rent Own
Carol Cats Name Tiger
Carol Car Type Ford
Carol Own/Rent Rent
Ted Own/Rent Own
Alice Dogs Name Growler
Alice Cats Name Cali
Alice Car Type GMC
Alice Own/Rent Own


Dogs Name Cats Name Car Type Own/Rent
Bob Rover Mewl Mustang Own
Carol Tiger Ford Rent
Ted Own
Alice Growler Cali GMC Own









share|improve this question

























  • This may be useful

    – cybernetic.nomad
    Feb 20 at 22:07











  • related

    – timotree
    Feb 20 at 22:48














-1












-1








-1








I have an Excel 365 (2016) file that contains rows of questions/answers that I need converted to columns as shown below.



Sample Excel



Person  Question    Answer      
Bob Dogs Name Rover
Bob Cats Name Mewl
Bob Car Type Mustang
Bob Own/Rent Own
Carol Cats Name Tiger
Carol Car Type Ford
Carol Own/Rent Rent
Ted Own/Rent Own
Alice Dogs Name Growler
Alice Cats Name Cali
Alice Car Type GMC
Alice Own/Rent Own


Dogs Name Cats Name Car Type Own/Rent
Bob Rover Mewl Mustang Own
Carol Tiger Ford Rent
Ted Own
Alice Growler Cali GMC Own









share|improve this question
















I have an Excel 365 (2016) file that contains rows of questions/answers that I need converted to columns as shown below.



Sample Excel



Person  Question    Answer      
Bob Dogs Name Rover
Bob Cats Name Mewl
Bob Car Type Mustang
Bob Own/Rent Own
Carol Cats Name Tiger
Carol Car Type Ford
Carol Own/Rent Rent
Ted Own/Rent Own
Alice Dogs Name Growler
Alice Cats Name Cali
Alice Car Type GMC
Alice Own/Rent Own


Dogs Name Cats Name Car Type Own/Rent
Bob Rover Mewl Mustang Own
Carol Tiger Ford Rent
Ted Own
Alice Growler Cali GMC Own






microsoft-excel worksheet-function






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 21 at 7:32









Máté Juhász

14.7k63452




14.7k63452










asked Feb 20 at 20:54









D PaceD Pace

31




31













  • This may be useful

    – cybernetic.nomad
    Feb 20 at 22:07











  • related

    – timotree
    Feb 20 at 22:48



















  • This may be useful

    – cybernetic.nomad
    Feb 20 at 22:07











  • related

    – timotree
    Feb 20 at 22:48

















This may be useful

– cybernetic.nomad
Feb 20 at 22:07





This may be useful

– cybernetic.nomad
Feb 20 at 22:07













related

– timotree
Feb 20 at 22:48





related

– timotree
Feb 20 at 22:48










3 Answers
3






active

oldest

votes


















0














Try to use Power Query get the result:




  1. Select range- Go to Data- From Range/Table:
    enter image description here


  2. Select Question Column- go to Transform tab- Select Pivot Column- Values Column select Answer- Advanced options select Don't Aggreate:
    enter image description here


  3. Close and Load:
    enter image description here







share|improve this answer
























  • This was a perfect answer and it efficiently gave me the steps to do exactly what I needed! Thanks for a great response.

    – D Pace
    Feb 22 at 18:05



















1














in order to get your column and row headers, you need to generate a list of unique entries. This can be achieved formulaicly, you can manually type it out or you can use a built in tool in the ribbon called text to columns:



remove duplicates



Step 1



Copy the range you want unique values from to a separate area. Then select the copied list:



select columns



Step 2



Select Remove Duplicates from ribbon



remove duplicates



Step 3



Click the "My data has headers" in the upper right if applicable to your range, and then select ok



OK



Step 4



Repeat Steps 1 to 3 for the other column



other column



Step 5



Transpose the unique column that you want to use for column headers. Select the column you want to transpose. right click and select copy:



copy



Select the location where the first cell of the header row is to be. In this example H1. Right click and under the paste choices, select transpose:



Transpose



Step 7



Fill in the table. Base on the examples that I have been showing, in H2 enter the following formula and copy it down and right to fill in the table:



=IFERROR(INDEX($C:$C,AGGREGATE(14,6,ROW($A$2:$A$13)/(($A$2:$A$13=$G2)*($B$2:$B$13=H$1)),1)),"")


end result



AGGREGATE with formula choice 14 performs array operations within its brackets. As a result do not use full column references within these brackets. NOTE the $C:$C is outside the AGGRGRATE function where it is safe to use full column references.



There are other ways to achieve this.






share|improve this answer

































    -2














    What you are looking for is called a Pivot Table. This function can take repeated data from one or more columns and pivot it to become a header.



    All modern spreadsheet programs use that name for this function, but each one handles it slightly differently. Microsoft provides an introduction to this function in your specific application:
    https://support.office.com/en-gb/article/create-a-pivottable-to-analyze-worksheet-data-a9a84538-bfe9-40a9-a8e9-f99134456576






    share|improve this answer
























    • 1. this does not answer the question, just gives a hint. 2. pivot table won't be useful here as it can't work well correctly with text (only show count or distinct count of items, but can't show the text itself).

      – Máté Juhász
      Feb 21 at 7:34











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1407929%2fhow-to-convert-rows-of-questions-and-answers-to-single-row-with-columns%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Try to use Power Query get the result:




    1. Select range- Go to Data- From Range/Table:
      enter image description here


    2. Select Question Column- go to Transform tab- Select Pivot Column- Values Column select Answer- Advanced options select Don't Aggreate:
      enter image description here


    3. Close and Load:
      enter image description here







    share|improve this answer
























    • This was a perfect answer and it efficiently gave me the steps to do exactly what I needed! Thanks for a great response.

      – D Pace
      Feb 22 at 18:05
















    0














    Try to use Power Query get the result:




    1. Select range- Go to Data- From Range/Table:
      enter image description here


    2. Select Question Column- go to Transform tab- Select Pivot Column- Values Column select Answer- Advanced options select Don't Aggreate:
      enter image description here


    3. Close and Load:
      enter image description here







    share|improve this answer
























    • This was a perfect answer and it efficiently gave me the steps to do exactly what I needed! Thanks for a great response.

      – D Pace
      Feb 22 at 18:05














    0












    0








    0







    Try to use Power Query get the result:




    1. Select range- Go to Data- From Range/Table:
      enter image description here


    2. Select Question Column- go to Transform tab- Select Pivot Column- Values Column select Answer- Advanced options select Don't Aggreate:
      enter image description here


    3. Close and Load:
      enter image description here







    share|improve this answer













    Try to use Power Query get the result:




    1. Select range- Go to Data- From Range/Table:
      enter image description here


    2. Select Question Column- go to Transform tab- Select Pivot Column- Values Column select Answer- Advanced options select Don't Aggreate:
      enter image description here


    3. Close and Load:
      enter image description here








    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Feb 21 at 8:52









    LeeLee

    95927




    95927













    • This was a perfect answer and it efficiently gave me the steps to do exactly what I needed! Thanks for a great response.

      – D Pace
      Feb 22 at 18:05



















    • This was a perfect answer and it efficiently gave me the steps to do exactly what I needed! Thanks for a great response.

      – D Pace
      Feb 22 at 18:05

















    This was a perfect answer and it efficiently gave me the steps to do exactly what I needed! Thanks for a great response.

    – D Pace
    Feb 22 at 18:05





    This was a perfect answer and it efficiently gave me the steps to do exactly what I needed! Thanks for a great response.

    – D Pace
    Feb 22 at 18:05













    1














    in order to get your column and row headers, you need to generate a list of unique entries. This can be achieved formulaicly, you can manually type it out or you can use a built in tool in the ribbon called text to columns:



    remove duplicates



    Step 1



    Copy the range you want unique values from to a separate area. Then select the copied list:



    select columns



    Step 2



    Select Remove Duplicates from ribbon



    remove duplicates



    Step 3



    Click the "My data has headers" in the upper right if applicable to your range, and then select ok



    OK



    Step 4



    Repeat Steps 1 to 3 for the other column



    other column



    Step 5



    Transpose the unique column that you want to use for column headers. Select the column you want to transpose. right click and select copy:



    copy



    Select the location where the first cell of the header row is to be. In this example H1. Right click and under the paste choices, select transpose:



    Transpose



    Step 7



    Fill in the table. Base on the examples that I have been showing, in H2 enter the following formula and copy it down and right to fill in the table:



    =IFERROR(INDEX($C:$C,AGGREGATE(14,6,ROW($A$2:$A$13)/(($A$2:$A$13=$G2)*($B$2:$B$13=H$1)),1)),"")


    end result



    AGGREGATE with formula choice 14 performs array operations within its brackets. As a result do not use full column references within these brackets. NOTE the $C:$C is outside the AGGRGRATE function where it is safe to use full column references.



    There are other ways to achieve this.






    share|improve this answer






























      1














      in order to get your column and row headers, you need to generate a list of unique entries. This can be achieved formulaicly, you can manually type it out or you can use a built in tool in the ribbon called text to columns:



      remove duplicates



      Step 1



      Copy the range you want unique values from to a separate area. Then select the copied list:



      select columns



      Step 2



      Select Remove Duplicates from ribbon



      remove duplicates



      Step 3



      Click the "My data has headers" in the upper right if applicable to your range, and then select ok



      OK



      Step 4



      Repeat Steps 1 to 3 for the other column



      other column



      Step 5



      Transpose the unique column that you want to use for column headers. Select the column you want to transpose. right click and select copy:



      copy



      Select the location where the first cell of the header row is to be. In this example H1. Right click and under the paste choices, select transpose:



      Transpose



      Step 7



      Fill in the table. Base on the examples that I have been showing, in H2 enter the following formula and copy it down and right to fill in the table:



      =IFERROR(INDEX($C:$C,AGGREGATE(14,6,ROW($A$2:$A$13)/(($A$2:$A$13=$G2)*($B$2:$B$13=H$1)),1)),"")


      end result



      AGGREGATE with formula choice 14 performs array operations within its brackets. As a result do not use full column references within these brackets. NOTE the $C:$C is outside the AGGRGRATE function where it is safe to use full column references.



      There are other ways to achieve this.






      share|improve this answer




























        1












        1








        1







        in order to get your column and row headers, you need to generate a list of unique entries. This can be achieved formulaicly, you can manually type it out or you can use a built in tool in the ribbon called text to columns:



        remove duplicates



        Step 1



        Copy the range you want unique values from to a separate area. Then select the copied list:



        select columns



        Step 2



        Select Remove Duplicates from ribbon



        remove duplicates



        Step 3



        Click the "My data has headers" in the upper right if applicable to your range, and then select ok



        OK



        Step 4



        Repeat Steps 1 to 3 for the other column



        other column



        Step 5



        Transpose the unique column that you want to use for column headers. Select the column you want to transpose. right click and select copy:



        copy



        Select the location where the first cell of the header row is to be. In this example H1. Right click and under the paste choices, select transpose:



        Transpose



        Step 7



        Fill in the table. Base on the examples that I have been showing, in H2 enter the following formula and copy it down and right to fill in the table:



        =IFERROR(INDEX($C:$C,AGGREGATE(14,6,ROW($A$2:$A$13)/(($A$2:$A$13=$G2)*($B$2:$B$13=H$1)),1)),"")


        end result



        AGGREGATE with formula choice 14 performs array operations within its brackets. As a result do not use full column references within these brackets. NOTE the $C:$C is outside the AGGRGRATE function where it is safe to use full column references.



        There are other ways to achieve this.






        share|improve this answer















        in order to get your column and row headers, you need to generate a list of unique entries. This can be achieved formulaicly, you can manually type it out or you can use a built in tool in the ribbon called text to columns:



        remove duplicates



        Step 1



        Copy the range you want unique values from to a separate area. Then select the copied list:



        select columns



        Step 2



        Select Remove Duplicates from ribbon



        remove duplicates



        Step 3



        Click the "My data has headers" in the upper right if applicable to your range, and then select ok



        OK



        Step 4



        Repeat Steps 1 to 3 for the other column



        other column



        Step 5



        Transpose the unique column that you want to use for column headers. Select the column you want to transpose. right click and select copy:



        copy



        Select the location where the first cell of the header row is to be. In this example H1. Right click and under the paste choices, select transpose:



        Transpose



        Step 7



        Fill in the table. Base on the examples that I have been showing, in H2 enter the following formula and copy it down and right to fill in the table:



        =IFERROR(INDEX($C:$C,AGGREGATE(14,6,ROW($A$2:$A$13)/(($A$2:$A$13=$G2)*($B$2:$B$13=H$1)),1)),"")


        end result



        AGGREGATE with formula choice 14 performs array operations within its brackets. As a result do not use full column references within these brackets. NOTE the $C:$C is outside the AGGRGRATE function where it is safe to use full column references.



        There are other ways to achieve this.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 21 at 13:11

























        answered Feb 20 at 22:41









        Forward EdForward Ed

        901214




        901214























            -2














            What you are looking for is called a Pivot Table. This function can take repeated data from one or more columns and pivot it to become a header.



            All modern spreadsheet programs use that name for this function, but each one handles it slightly differently. Microsoft provides an introduction to this function in your specific application:
            https://support.office.com/en-gb/article/create-a-pivottable-to-analyze-worksheet-data-a9a84538-bfe9-40a9-a8e9-f99134456576






            share|improve this answer
























            • 1. this does not answer the question, just gives a hint. 2. pivot table won't be useful here as it can't work well correctly with text (only show count or distinct count of items, but can't show the text itself).

              – Máté Juhász
              Feb 21 at 7:34
















            -2














            What you are looking for is called a Pivot Table. This function can take repeated data from one or more columns and pivot it to become a header.



            All modern spreadsheet programs use that name for this function, but each one handles it slightly differently. Microsoft provides an introduction to this function in your specific application:
            https://support.office.com/en-gb/article/create-a-pivottable-to-analyze-worksheet-data-a9a84538-bfe9-40a9-a8e9-f99134456576






            share|improve this answer
























            • 1. this does not answer the question, just gives a hint. 2. pivot table won't be useful here as it can't work well correctly with text (only show count or distinct count of items, but can't show the text itself).

              – Máté Juhász
              Feb 21 at 7:34














            -2












            -2








            -2







            What you are looking for is called a Pivot Table. This function can take repeated data from one or more columns and pivot it to become a header.



            All modern spreadsheet programs use that name for this function, but each one handles it slightly differently. Microsoft provides an introduction to this function in your specific application:
            https://support.office.com/en-gb/article/create-a-pivottable-to-analyze-worksheet-data-a9a84538-bfe9-40a9-a8e9-f99134456576






            share|improve this answer













            What you are looking for is called a Pivot Table. This function can take repeated data from one or more columns and pivot it to become a header.



            All modern spreadsheet programs use that name for this function, but each one handles it slightly differently. Microsoft provides an introduction to this function in your specific application:
            https://support.office.com/en-gb/article/create-a-pivottable-to-analyze-worksheet-data-a9a84538-bfe9-40a9-a8e9-f99134456576







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Feb 20 at 22:11









            JCDJCD

            304




            304













            • 1. this does not answer the question, just gives a hint. 2. pivot table won't be useful here as it can't work well correctly with text (only show count or distinct count of items, but can't show the text itself).

              – Máté Juhász
              Feb 21 at 7:34



















            • 1. this does not answer the question, just gives a hint. 2. pivot table won't be useful here as it can't work well correctly with text (only show count or distinct count of items, but can't show the text itself).

              – Máté Juhász
              Feb 21 at 7:34

















            1. this does not answer the question, just gives a hint. 2. pivot table won't be useful here as it can't work well correctly with text (only show count or distinct count of items, but can't show the text itself).

            – Máté Juhász
            Feb 21 at 7:34





            1. this does not answer the question, just gives a hint. 2. pivot table won't be useful here as it can't work well correctly with text (only show count or distinct count of items, but can't show the text itself).

            – Máté Juhász
            Feb 21 at 7:34


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1407929%2fhow-to-convert-rows-of-questions-and-answers-to-single-row-with-columns%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Probability when a professor distributes a quiz and homework assignment to a class of n students.

            Aardman Animations

            Are they similar matrix