How to tranpose 2 column excel spreadsheet by column A group

kowalski_ldn

New member
Joined
Jun 26, 2013
Messages
3
Reaction score
0
Points
0
Firstly, apologies if this has been asked before but I have been trawling the site for half an hour and haven't found a solution to the question I'm asking. Some of the questions are close but I haven't been able to apply the answers to this issue.

In a nutshell, I have two columns of data in a spreadsheet, column A are the "groups" and column B is a list of names. I would like to transpose the data, grouping by column A, as follows.

CURRENT LAYOUT

C-- Steve
A-- James
A-- Alex
B-- Sarah
D-- David
A-- Joanna
D-- Colin
A-- Brian
D-- Peter
E-- Sally

DESIRED LAYOUT

A-- James-- Alex-- Joanna--Brian

B-- Sarah

C-- Steve

D-- David-- Colin-- Peter

E-- Sally


I've been trying to use a pivot table but it won't allow to me output the data in this way (or perhaps I've missed something?).
 
View attachment Book4.xlsx See attached. Yes, you can do with with a pivot. You just need to create a pivot (preferably turn your datasource into an Excel Table with the Ctrl T shortcut first, so that the pivot always points to the data even if you add new rows), then drag the column with letters into the ROWS field, drag the ones with Names into the ROWS field also, turn off subtotals, and select 'Show in Tabular form' from PivotTable Tools>Design Tab> Report Layout

See attached.
 
Thanks for getting back to me, really appreciate it! :yo:

This isn't quite what I was after unfortunately. I got this far with the pivot table method but I need to be able to display the different groups (i.e grades) as rows with one row per grade and with names as columns. To illustrate this better, I'd like to be able to display this....

GradeName
A Alex
Brian
James
Joanna
B Sarah
C Steve
D Colin
David
Peter
E Sally
as this
GradeName
A Alex Brian James Joanna
B Sarah
C Steve
D Colin David Peter
E Sally
 
Nice approach, herbds7. I completely misunderstood this question sorry, kowalski_ldn

Now that I get it, I'd propose this formula:=IFERROR(INDEX(INDEX(Table1[Name],MATCH([@Grade],Table1[Grade],FALSE)):INDEX(Table1[Name],MATCH([@Grade],Table1[Grade],TRUE)),Table2[[#Headers],[1]:[10]]),"")...entered into the same table that herbds7 used with his approach. Good thing about this is that it doesn't require any intermediate columns. Only works if your data is sorted by Grade (as it is in your example).

See attached: View attachment Formula crosstab from sorted data 20130629.xlsb
 
Sorry for the delayed reply and many thanks for your help. This has really helped me out!
 
Back
Top