Vertical to Horizontal

Brown

Board Regular
Joined
Sep 14, 2009
Messages
200
Office Version
  1. 365
Thanks in advance for your assistance.

How can I take this information and make it so the information reads Horizontally? I need one row and each of the items in column G to be in a separate column like the second screen shot.


1727887513207.png



1727887723293.png
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
One option available is to pivot your data with Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Grouped Rows" = Table.Group(Source, {"Student ID"}, {{"Data", each _, type table [First Name=text, Last Name=text, Student ID=number, Gender=text, Grade Lev=number, #" Homeroom Teacher "=text, SPRING SEMESTER PLACEMENT=text]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Data],"Index",1,1)),
    #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Custom"}),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Removed Other Columns", "Custom", {"First Name", "Last Name", "Student ID", "Gender", "Grade Lev", " Homeroom Teacher ", "SPRING SEMESTER PLACEMENT", "Index"}, {"First Name", "Last Name", "Student ID", "Gender", "Grade Lev", " Homeroom Teacher ", "SPRING SEMESTER PLACEMENT", "Index"}),
    #"Added Prefix" = Table.TransformColumns(#"Expanded Custom", {{"Index", each "Course " & Text.From(_, "en-US"), type text}}),
    #"Pivoted Column" = Table.Pivot(#"Added Prefix", List.Distinct(#"Added Prefix"[Index]), "Index", "SPRING SEMESTER PLACEMENT")
in
    #"Pivoted Column"

Book1
ABCDEFGHIJK
1First NameLast NameStudent IDGenderGrade Lev Homeroom Teacher SPRING SEMESTER PLACEMENT
2BillSmith1260540M9Jane DoeAlgebra B
3BillSmith1260540M9Jane DoeBiology B
4BillSmith1260540M9Jane DoeFrench 1 B
5BillSmith1260540M9Jane DoePLTW Introduction to Engineering Design B
6BillSmith1260540M9Jane DoeWorld Geography B
7
8First NameLast NameStudent IDGenderGrade Lev Homeroom Teacher Course 1Course 2Course 3Course 4Course 5
9BillSmith1260540M9Jane DoeAlgebra BBiology BFrench 1 BPLTW Introduction to Engineering Design BWorld Geography B
Sheet1
 
Upvote 0
One option available is to pivot your data with Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Grouped Rows" = Table.Group(Source, {"Student ID"}, {{"Data", each _, type table [First Name=text, Last Name=text, Student ID=number, Gender=text, Grade Lev=number, #" Homeroom Teacher "=text, SPRING SEMESTER PLACEMENT=text]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Data],"Index",1,1)),
    #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Custom"}),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Removed Other Columns", "Custom", {"First Name", "Last Name", "Student ID", "Gender", "Grade Lev", " Homeroom Teacher ", "SPRING SEMESTER PLACEMENT", "Index"}, {"First Name", "Last Name", "Student ID", "Gender", "Grade Lev", " Homeroom Teacher ", "SPRING SEMESTER PLACEMENT", "Index"}),
    #"Added Prefix" = Table.TransformColumns(#"Expanded Custom", {{"Index", each "Course " & Text.From(_, "en-US"), type text}}),
    #"Pivoted Column" = Table.Pivot(#"Added Prefix", List.Distinct(#"Added Prefix"[Index]), "Index", "SPRING SEMESTER PLACEMENT")
in
    #"Pivoted Column"

Book1
ABCDEFGHIJK
1First NameLast NameStudent IDGenderGrade Lev Homeroom Teacher SPRING SEMESTER PLACEMENT
2BillSmith1260540M9Jane DoeAlgebra B
3BillSmith1260540M9Jane DoeBiology B
4BillSmith1260540M9Jane DoeFrench 1 B
5BillSmith1260540M9Jane DoePLTW Introduction to Engineering Design B
6BillSmith1260540M9Jane DoeWorld Geography B
7
8First NameLast NameStudent IDGenderGrade Lev Homeroom Teacher Course 1Course 2Course 3Course 4Course 5
9BillSmith1260540M9Jane DoeAlgebra BBiology BFrench 1 BPLTW Introduction to Engineering Design BWorld Geography B
Sheet1
Thank you for the help. I will give this a try and see if I can make it work.
I appreciate the assist.
 
Upvote 0
A formula option
Fluff.xlsm
ABCDEFGHIJKLMNOPQRST
1First NameLast NameStudent IDGenderGrade Lev Homeroom Teacher SPRING SEMESTER PLACEMENT
2BillSmith1260540M9Jane DoeAlgebra BBillSmith1260540M9Jane DoeAlgebra BBiology BFrench 1 B
3BillSmith1260540M9Jane DoeBiology BAnneSmith1260541F9Jane DoePLTW Introduction to Engineering Design BWorld Geography B
4BillSmith1260540M9Jane DoeFrench 1 B
5AnneSmith1260541F9Jane DoePLTW Introduction to Engineering Design B
6AnneSmith1260541F9Jane DoeWorld Geography B
Sheet6
Cell Formulas
RangeFormula
K2:S3K2=LET(u,UNIQUE(FILTER(C2:C100,C2:C100<>"")),m,MAX(COUNTIFS(C:C,u)),DROP(REDUCE("",u,LAMBDA(x,y,VSTACK(x,HSTACK(TAKE(FILTER(A2:F100,C2:C100=y),1),EXPAND(TOROW(FILTER(G2:G100,C2:C100=y)),,m,""))))),1))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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