How to convert rows of questions and answers to single row with columns
I have an Excel 365 (2016) file that contains rows of questions/answers that I need converted to columns as shown below.
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
add a comment |
I have an Excel 365 (2016) file that contains rows of questions/answers that I need converted to columns as shown below.
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
This may be useful
– cybernetic.nomad
Feb 20 at 22:07
related
– timotree
Feb 20 at 22:48
add a comment |
I have an Excel 365 (2016) file that contains rows of questions/answers that I need converted to columns as shown below.
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
I have an Excel 365 (2016) file that contains rows of questions/answers that I need converted to columns as shown below.
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
microsoft-excel worksheet-function
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
add a comment |
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
add a comment |
3 Answers
3
active
oldest
votes
Try to use Power Query get the result:
Select range- Go to Data- From Range/Table:
Select Question Column- go to Transform tab- Select Pivot Column- Values Column select Answer- Advanced options select Don't Aggreate:
Close and Load:
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
add a comment |
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:
Step 1
Copy the range you want unique values from to a separate area. Then select the copied list:
Step 2
Select Remove Duplicates from ribbon
Step 3
Click the "My data has headers" in the upper right if applicable to your range, and then select ok
Step 4
Repeat Steps 1 to 3 for the 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:
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:
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)),"")
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.
add a comment |
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
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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Try to use Power Query get the result:
Select range- Go to Data- From Range/Table:
Select Question Column- go to Transform tab- Select Pivot Column- Values Column select Answer- Advanced options select Don't Aggreate:
Close and Load:
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
add a comment |
Try to use Power Query get the result:
Select range- Go to Data- From Range/Table:
Select Question Column- go to Transform tab- Select Pivot Column- Values Column select Answer- Advanced options select Don't Aggreate:
Close and Load:
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
add a comment |
Try to use Power Query get the result:
Select range- Go to Data- From Range/Table:
Select Question Column- go to Transform tab- Select Pivot Column- Values Column select Answer- Advanced options select Don't Aggreate:
Close and Load:
Try to use Power Query get the result:
Select range- Go to Data- From Range/Table:
Select Question Column- go to Transform tab- Select Pivot Column- Values Column select Answer- Advanced options select Don't Aggreate:
Close and Load:
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
add a comment |
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
add a comment |
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:
Step 1
Copy the range you want unique values from to a separate area. Then select the copied list:
Step 2
Select Remove Duplicates from ribbon
Step 3
Click the "My data has headers" in the upper right if applicable to your range, and then select ok
Step 4
Repeat Steps 1 to 3 for the 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:
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:
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)),"")
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.
add a comment |
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:
Step 1
Copy the range you want unique values from to a separate area. Then select the copied list:
Step 2
Select Remove Duplicates from ribbon
Step 3
Click the "My data has headers" in the upper right if applicable to your range, and then select ok
Step 4
Repeat Steps 1 to 3 for the 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:
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:
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)),"")
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.
add a comment |
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:
Step 1
Copy the range you want unique values from to a separate area. Then select the copied list:
Step 2
Select Remove Duplicates from ribbon
Step 3
Click the "My data has headers" in the upper right if applicable to your range, and then select ok
Step 4
Repeat Steps 1 to 3 for the 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:
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:
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)),"")
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.
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:
Step 1
Copy the range you want unique values from to a separate area. Then select the copied list:
Step 2
Select Remove Duplicates from ribbon
Step 3
Click the "My data has headers" in the upper right if applicable to your range, and then select ok
Step 4
Repeat Steps 1 to 3 for the 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:
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:
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)),"")
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.
edited Feb 21 at 13:11
answered Feb 20 at 22:41
Forward EdForward Ed
901214
901214
add a comment |
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
This may be useful
– cybernetic.nomad
Feb 20 at 22:07
related
– timotree
Feb 20 at 22:48