Listing names from a column into new columns under their relevant heading

Mazbuka

New Member
Joined
Sep 23, 2018
Messages
23
Office Version
  1. 365
Platform
  1. Windows
I have a big list of students in Col A & their school form in Col B. I list each unique form as column headers from C onwards and underneath each header I want the list of students in that form.

My data sample looks like this:

AB
1STUDENTFORM
2JohnY01A
3PaulY02C
4MaryY01B
5JuneY01A
6MickY02C
7BrianY01B
8KarenY02C
9DonY01B
10PatY01B

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

<colgroup><col><col><col></colgroup><tbody>
</tbody>


The resultant data needs to be listed as below:

CDE
1Y01AY01BY02C
2JohnMaryPaul
3JuneBrianMick
4DonKaren
5Pat
6
7
8
9
10

<colgroup><col><col><col span="3"></colgroup><tbody>
</tbody>
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
How about

+Fluff 1.xlsm
ABCDE
1STUDENTFORMY01AY01BY02C
2JohnY01AJohnMaryPaul
3PaulY02CJuneBrianMick
4MaryY01B DonKaren
5JuneY01A Pat 
6MickY02C   
7BrianY01B
8KarenY02C
9DonY01B
10PatY01B
11
12
Main
Cell Formulas
RangeFormula
C2:E6C2=IFERROR(INDEX($A$2:$A$10,AGGREGATE(15,6,(ROW($A$2:$A$10)-ROW($A$2)+1)/($B$2:$B$10=C$1),ROWS($A$2:$A2))),"")
 
Last edited:
Upvote 0
Solution
Edit: Looks like I was a fraction slow. :)

Try this copied across and down.

Excel Workbook
ABCDE
1STUDENTFORMY01AY01BY02C
2JohnY01AJohnMaryPaul
3PaulY02CJuneBrianMick
4MaryY01BDonKaren
5JuneY01APat
6MickY02C
7BrianY01B
8KarenY02C
9DonY01B
10PatY01B
11
List
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,013
Members
448,935
Latest member
ijat

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