Go from Events with list of dates to Dates with list of events

abhinavk11

New Member
Joined
Oct 7, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello!

I have what seems to be a simple task, but frustratingly I can't find out a way to automate it.

I have a table of universities and interview dates. Each university has multiple interview dates. Each row is a university name (Column 1) and the dates it's having interviews (in subsequent columns).

I'm trying to summarise by interview date. I'd like to make a summary table where each row is a date (Column 1) and the universities who have interviews on that date (in subsequent Columns).

I've tried pivot tables, but they're not able to handle having multiple dates per university.

Could anyone please help? Range pasted at bottom.

Thank you

--Abhinav

Program NameDate1Date2Date3Date4Date5Date6Date7
U Texas/ Methodist -Galveston27-Oct-209-Nov-2020-Nov-208-Dec-20
Illinois Eye and Ear Infirmary29-Oct-2030-Oct-202-Nov-20
U Kentucky30-Oct-206-Nov-2020-Nov-20
University of Mississippi30-Oct-2031-Oct-207-Nov-2021-Nov-20
UT Southwestern- Dallas30-Oct-206-Nov-204-Dec-2011-Dec-208-Jan-21
Boston University2-Nov-209-Dec-2030-Nov-20
Scheie Eye Inst / U Penn2-Nov-2011-Nov-2020-Nov-20
U Utah4-Nov-206-Nov-209-Nov-2011-Nov-20
Wake Forest U4-Nov-206-Nov-2018-Nov-2020-Nov-202-Dec-204-Dec-2016-Dec-20
Wilmer-Johns Hopkins5-Nov-2019-Nov-20
U Alabama - Birmingham6-Nov-20
U Oklahoma-Oklahoma City6-Nov-209-Nov-2023-Nov-2011-Dec-20
Case Western Reserve U8-Nov-2020-Nov-2021-Nov-20
U Pittsburgh9-Nov-2010-Nov-20
Stroger/Cook Cty-Chicago10-Nov-2012-Nov-20
U Texas - Houston16-Nov-2020-Nov-2030-Nov-204-Dec-20
U Minnesota - Mpls.19-Nov-2020-Nov-20
U Washington19-Nov-203-Dec-204-Dec-20
Duke University20-Nov-204-Dec-20
U California - Davis20-Nov-204-Dec-2011-Dec-20
U Tennessee - Memphis20-Nov-2011-Dec-20
Oregon HSU21-Nov-205-Dec-20
USC Roski Eye Institute – Residency1-Dec-202-Dec-20
Stanford Ophthalmology Advanced Research Residency Program (SOAR)2-Dec-208-Dec-2014-Dec-20
Med U South Carolina3-Dec-204-Dec-20
U Arkansas3-Dec-204-Dec-205-Dec-2010-Dec-2011-Dec-2012-Dec-20
University of South Florida3-Dec-204-Dec-20
U Colorado4-Dec-206-Dec-2011-Dec-20
Emory University5-Dec-206-Dec-20
U Louisville5-Dec-206-Dec-2012-Dec-20
Cleveland Clinic - Cole Eye Institute6-Dec-207-Dec-208-Dec-20
Sinai Hospital -Baltimore7-Dec-209-Dec-2015-Dec-2017-Dec-20
U California - San Diego7-Dec-2014-Dec-20
U Miami / Bascom Palmer9-Dec-2010-Dec-2011-Dec-20
Wills Eye Residency Program at Jefferson14-Dec-2015-Dec-20
U California - LA16-Dec-206-Jan-2113-Jan-21
Baylor College of Medicine/Cullen Eye Institute4-Jan-215-Jan-218-Jan-21
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
with Power Query which is called Get and Transform in your version of Excel and found on the Data Tab of the Ribbon. Here is the Mcode

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Program Name", type text}, {"Date1", type date}, {"Date2", type date}, {"Date3", type date}, {"Date4", type date}, {"Date5", type date}, {"Date6", type date}, {"Date7", type date}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Program Name"}, "Attribute", "Value"),
    #"Grouped Rows" = Table.Group(#"Unpivoted Other Columns", {"Value"}, {{"Data", each _, type table [Program Name=nullable text, Attribute=text, Value=date]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Data], "Index", 1, 1)),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Program Name", "Index"}, {"Custom.Program Name", "Custom.Index"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Custom",{"Data"}),
    #"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Removed Columns", {{"Custom.Index", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Removed Columns", {{"Custom.Index", type text}}, "en-US")[Custom.Index]), "Custom.Index", "Custom.Program Name")
in
    #"Pivoted Column"

Book3
ABCDEFGHIJK
1Value12345678910
210/27/2020U Texas/ Methodist -Galveston
310/29/2020Illinois Eye and Ear Infirmary
410/30/2020Illinois Eye and Ear InfirmaryU KentuckyUniversity of MississippiUT Southwestern- Dallas
510/31/2020University of Mississippi
611/2/2020Illinois Eye and Ear InfirmaryBoston UniversityScheie Eye Inst / U Penn
711/4/2020U UtahWake Forest U
811/5/2020Wilmer-Johns Hopkins
911/6/2020U KentuckyUT Southwestern- DallasU UtahWake Forest UU Alabama - BirminghamU Oklahoma-Oklahoma City
1011/7/2020University of Mississippi
1111/8/2020Case Western Reserve U
1211/9/2020U Texas/ Methodist -GalvestonU UtahU Oklahoma-Oklahoma CityU Pittsburgh
1311/10/2020U PittsburghStroger/Cook Cty-Chicago
1411/11/2020Scheie Eye Inst / U PennU Utah
1511/12/2020Stroger/Cook Cty-Chicago
1611/16/2020U Texas - Houston
1711/18/2020Wake Forest U
1811/19/2020Wilmer-Johns HopkinsU Minnesota - Mpls.U Washington
1911/20/2020U Texas/ Methodist -GalvestonU KentuckyScheie Eye Inst / U PennWake Forest UCase Western Reserve UU Texas - HoustonU Minnesota - Mpls.Duke UniversityU California - DavisU Tennessee - Memphis
2011/21/2020University of MississippiCase Western Reserve UOregon HSU
2111/23/2020U Oklahoma-Oklahoma City
2211/30/2020Boston UniversityU Texas - Houston
2312/1/2020USC Roski Eye Institute – Residency
2412/2/2020Wake Forest UUSC Roski Eye Institute – ResidencyStanford Ophthalmology Advanced Research Residency Program (SOAR)
2512/3/2020U WashingtonMed U South CarolinaU ArkansasUniversity of South Florida
2612/4/2020UT Southwestern- DallasWake Forest UU Texas - HoustonU WashingtonDuke UniversityU California - DavisMed U South CarolinaU ArkansasUniversity of South FloridaU Colorado
2712/5/2020Oregon HSUU ArkansasEmory UniversityU Louisville
2812/6/2020U ColoradoEmory UniversityU LouisvilleCleveland Clinic - Cole Eye Institute
2912/7/2020Cleveland Clinic - Cole Eye InstituteSinai Hospital -BaltimoreU California - San Diego
3012/8/2020U Texas/ Methodist -GalvestonStanford Ophthalmology Advanced Research Residency Program (SOAR)Cleveland Clinic - Cole Eye Institute
3112/9/2020Boston UniversitySinai Hospital -BaltimoreU Miami / Bascom Palmer
3212/10/2020U ArkansasU Miami / Bascom Palmer
3312/11/2020UT Southwestern- DallasU Oklahoma-Oklahoma CityU California - DavisU Tennessee - MemphisU ArkansasU ColoradoU Miami / Bascom Palmer
3412/12/2020U ArkansasU Louisville
3512/14/2020Stanford Ophthalmology Advanced Research Residency Program (SOAR)U California - San DiegoWills Eye Residency Program at Jefferson
3612/15/2020Sinai Hospital -BaltimoreWills Eye Residency Program at Jefferson
3712/16/2020Wake Forest UU California - LA
3812/17/2020Sinai Hospital -Baltimore
391/4/2021Baylor College of Medicine/Cullen Eye Institute
401/5/2021Baylor College of Medicine/Cullen Eye Institute
411/6/2021U California - LA
421/8/2021UT Southwestern- DallasBaylor College of Medicine/Cullen Eye Institute
Sheet2
 
Upvote 0
with Power Query which is called Get and Transform in your version of Excel and found on the Data Tab of the Ribbon. Here is the Mcode

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Program Name", type text}, {"Date1", type date}, {"Date2", type date}, {"Date3", type date}, {"Date4", type date}, {"Date5", type date}, {"Date6", type date}, {"Date7", type date}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Program Name"}, "Attribute", "Value"),
    #"Grouped Rows" = Table.Group(#"Unpivoted Other Columns", {"Value"}, {{"Data", each _, type table [Program Name=nullable text, Attribute=text, Value=date]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Data], "Index", 1, 1)),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Program Name", "Index"}, {"Custom.Program Name", "Custom.Index"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Custom",{"Data"}),
    #"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Removed Columns", {{"Custom.Index", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Removed Columns", {{"Custom.Index", type text}}, "en-US")[Custom.Index]), "Custom.Index", "Custom.Program Name")
in
    #"Pivoted Column"

Book3
ABCDEFGHIJK
1Value12345678910
210/27/2020U Texas/ Methodist -Galveston
310/29/2020Illinois Eye and Ear Infirmary
410/30/2020Illinois Eye and Ear InfirmaryU KentuckyUniversity of MississippiUT Southwestern- Dallas
510/31/2020University of Mississippi
611/2/2020Illinois Eye and Ear InfirmaryBoston UniversityScheie Eye Inst / U Penn
711/4/2020U UtahWake Forest U
811/5/2020Wilmer-Johns Hopkins
911/6/2020U KentuckyUT Southwestern- DallasU UtahWake Forest UU Alabama - BirminghamU Oklahoma-Oklahoma City
1011/7/2020University of Mississippi
1111/8/2020Case Western Reserve U
1211/9/2020U Texas/ Methodist -GalvestonU UtahU Oklahoma-Oklahoma CityU Pittsburgh
1311/10/2020U PittsburghStroger/Cook Cty-Chicago
1411/11/2020Scheie Eye Inst / U PennU Utah
1511/12/2020Stroger/Cook Cty-Chicago
1611/16/2020U Texas - Houston
1711/18/2020Wake Forest U
1811/19/2020Wilmer-Johns HopkinsU Minnesota - Mpls.U Washington
1911/20/2020U Texas/ Methodist -GalvestonU KentuckyScheie Eye Inst / U PennWake Forest UCase Western Reserve UU Texas - HoustonU Minnesota - Mpls.Duke UniversityU California - DavisU Tennessee - Memphis
2011/21/2020University of MississippiCase Western Reserve UOregon HSU
2111/23/2020U Oklahoma-Oklahoma City
2211/30/2020Boston UniversityU Texas - Houston
2312/1/2020USC Roski Eye Institute – Residency
2412/2/2020Wake Forest UUSC Roski Eye Institute – ResidencyStanford Ophthalmology Advanced Research Residency Program (SOAR)
2512/3/2020U WashingtonMed U South CarolinaU ArkansasUniversity of South Florida
2612/4/2020UT Southwestern- DallasWake Forest UU Texas - HoustonU WashingtonDuke UniversityU California - DavisMed U South CarolinaU ArkansasUniversity of South FloridaU Colorado
2712/5/2020Oregon HSUU ArkansasEmory UniversityU Louisville
2812/6/2020U ColoradoEmory UniversityU LouisvilleCleveland Clinic - Cole Eye Institute
2912/7/2020Cleveland Clinic - Cole Eye InstituteSinai Hospital -BaltimoreU California - San Diego
3012/8/2020U Texas/ Methodist -GalvestonStanford Ophthalmology Advanced Research Residency Program (SOAR)Cleveland Clinic - Cole Eye Institute
3112/9/2020Boston UniversitySinai Hospital -BaltimoreU Miami / Bascom Palmer
3212/10/2020U ArkansasU Miami / Bascom Palmer
3312/11/2020UT Southwestern- DallasU Oklahoma-Oklahoma CityU California - DavisU Tennessee - MemphisU ArkansasU ColoradoU Miami / Bascom Palmer
3412/12/2020U ArkansasU Louisville
3512/14/2020Stanford Ophthalmology Advanced Research Residency Program (SOAR)U California - San DiegoWills Eye Residency Program at Jefferson
3612/15/2020Sinai Hospital -BaltimoreWills Eye Residency Program at Jefferson
3712/16/2020Wake Forest UU California - LA
3812/17/2020Sinai Hospital -Baltimore
391/4/2021Baylor College of Medicine/Cullen Eye Institute
401/5/2021Baylor College of Medicine/Cullen Eye Institute
411/6/2021U California - LA
421/8/2021UT Southwestern- DallasBaylor College of Medicine/Cullen Eye Institute
Sheet2

Sir - I thank you on bent knee.

I hope you have an excellent day ??

--Abhinav
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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