Unique tranposing: Data with one unique column and all other columns needed

RichColeman

New Member
Joined
Aug 12, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi All, I hope you can help.

My spreadsheet looks like this:
NameGrade
Abby7
Abby8
Abby8
Abby6
Bob3
Frank5
Frank5

I need to be changed so I have unique names and then there 'grades' transposed in columns not rows. Like this:

NAME
Abby788
Bob3
Frank55

Currently I get the unique names with:
=INDEX($A$2:$A$112, MATCH(0, COUNTIF($D$1:$D1, $A$2:$A$112), 0))
Which works.

Where I'm getting stuck is with the grades, I am using this:
=IFERROR(INDEX($B$2:$B$116, MATCH(0, COUNTIF($D3:D3,$B$2:$B$116)+IF($A$2:$A$116<>$D3, 1, 0), 0)), 0)

but the problem I am having is it's only bringing back unique grades and I need all to be displayed in columns

Does anyone have any ideas? I'd be really grateful!

Thanks
Rich
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Welcome to the MrExcel board!

Try this.

21 08 12.xlsm
ABCDEFGH
1NameGrade
2Abby7Abby7886
3Abby8Bob3
4Abby8Frank55
5Abby6
6Bob3
7Frank5
8Frank5
Grades
Cell Formulas
RangeFormula
D2:D4D2=UNIQUE(A2:A8)
E2:H2,E4:F4,E3E2=TRANSPOSE(FILTER(B2:B8,A2:A8=D2))
Dynamic array formulas.
 
Upvote 0
Welcome to the MrExcel board!

Try this.

21 08 12.xlsm
ABCDEFGH
1NameGrade
2Abby7Abby7886
3Abby8Bob3
4Abby8Frank55
5Abby6
6Bob3
7Frank5
8Frank5
Grades
Cell Formulas
RangeFormula
D2:D4D2=UNIQUE(A2:A8)
E2:H2,E4:F4,E3E2=TRANSPOSE(FILTER(B2:B8,A2:A8=D2))
Dynamic array formulas.
That's great Peter, that's worked a trick! Looks like I was making it to complicated for myself. Thanks for your help!
 
Upvote 0
You're welcome. Thanks for the follow-up.
Looks like you were not aware of some of the new functions available in Microsoft 365. :)

If the data might change, meaning the names list in column D might grow or shrink, the column E formula might be better as shown below. You can copy this further down column E and then if new names are added in column A, those names and their grades will automatically appear in columns D, E, F, ...

Excel Formula:
=IF(D2="","",TRANSPOSE(FILTER(B2:B8,A2:A8=D2)))
 
Upvote 0
Yes the data will definitely grow, so I'm sure this formula will be of great use. Many thanks again Peter!
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top