Row Population and Transposing of data

ibesmond

New Member
Joined
Nov 26, 2010
Messages
17
Hello

I have a data set that has some problems and needs cleanup, but I'm not sure how to accomplish this feat.

Basically I want to flatten the data as much as possible without loosing any data.
The data came from different sources so each row represents a row, and the column is where the data is located.
If This was a small set I would just go manually, but this is only a small subset of the data.
The sources are in no particular order.

The first data set is problem.
The second data set is solution 1. If I could get the data to this position I would be happy, but
The third tab is solution 2, if I could get it to this stage that would be the ultimate goal.

NameGenreBorn DateDied DateBorn LocationDied LocationParentsFavorite SongsCause of deathReligionMovies
Bob MarleyReggae
Bob MarleyMelanomaRastafariMarley
Bob MarleyNorval Marley, Cedella BookerCorner Stone
Bob Marley
2/6/1945​
5/11/1981​
Nine Mile, JamaicaMiami, FL
Bob MarleyRedemption Song
Buju BantonReggae
Buju Banton
7/15/1973​
Kingston, Jamaica
Buju BantonUntold Stories
Bunny WailerReggae
Bunny Wailer
4/10/1947​
Kingston, Jamaica
Bunny WailerCool Runnings
Burning SpearReggaeOld Marcus Garvey
Burning Spear
3/1/1945​
St. Ann Parish, Jamaica
Damian MarleyReggae
Damian Marley
7/21/1978​
Kingston, Jamaica
Damian MarleyBob Marley, Cindy BreakspeareWelcome to Jam Rock
Damian MarleyMedication
Dennis Brown
Dennis BrownReggaePneumothorax
Dennis BrownThe Promised Land
Dennis Brown
2/1/1957​
7/1/1999​
Kingston, JamaicaKingston, Jamaica
Desmend DekkerReggae
Desmend Dekker
7/16/1941​
5/25/2006​
St. Andrew Parish, JamaicaThornton Heath, United Kingdom
Desmend DekkerIsrealites
Jimmy CliffReggae
Jimmy Cliff
4/1/1948​
St. James Parish, Jamaica
Jimmy CliffI can See Clearly Now
Jimmy Cliff
Lee "Scratch" PerryReggae
Lee "Scratch" Perry
3/20/1936​
Kendal, Jamaica
Lee "Scratch" PerryChase the DevilLee Scratch Perry's Vision of Paradise
Lee "Scratch" Perry
Peter ToshReggae
Peter ToshYou Can't Blame the Youth
Peter Tosh
10/19/1944​
9/11/1987​
Grange Hill, JamaicaKingston, Jamaica
Peter ToshMurderRastafariStepping Razor: Red X
Peter ToshLegalize it
Peter ToshGlass House
Peter Tosh
Stephen MarleyReggae
Stephen Marley
5/19/1972​
Wilmington, DE
Stephen MarleyMind Control
Stephen MarleyMedication
Stephen MarleyChase Dem
Stephen MarleyIron Bars
Stephen MarleyInna Di Red
Ziggy MarleyReggae
Ziggy Marley
10/17/1968​
Kingston, Jamaica
Ziggy MarleyLooking
Ziggy MarleyTrue to Myself
Ziggy MarleyDragonfly
Ziggy MarleyKeep My Faith
Ziggy MarleyShark Tale
Ziggy MarleyLife and Debt
Ziggy MarleyI Am Bolt
Ziggy MarleyPup Star
Ziggy MarleyThe Strink is In

2nd Set

NameGenreBorn DateDied DateBorn LocationDied LocationParentsFavorite SongsCause of deathReligionMovies
Bob MarleyReggae
2/6/1945​
5/11/1981​
Nine Mile, JamaicaMiami, FLNorval Marley, Cedella BookerCorner StoneMelanomaRastafariMarley
Bob MarleyReggae
2/6/1945​
5/11/1981​
Nine Mile, JamaicaMiami, FLNorval Marley, Cedella BookerRedemption SongMelanomaRastafariMarley
Buju BantonReggae
7/15/1973​
Kingston, JamaicaUntold Stories
Bunny WailerReggae
4/10/1947​
Kingston, JamaicaCool Runnings
Burning SpearReggae
3/1/1945​
St. Ann Parish, JamaicaOld Marcus Garvey
Damian MarleyReggae
7/21/1978​
Kingston, JamaicaBob Marley, Cindy BreakspeareWelcome to Jam Rock
Damian MarleyReggae
7/21/1978​
Kingston, JamaicaBob Marley, Cindy BreakspeareMedication
Dennis BrownReggae
2/1/1957​
7/1/1999​
Kingston, JamaicaKingston, JamaicaThe Promised LandPneumothorax
Desmend DekkerReggae
7/16/1941​
5/25/2006​
St. Andrew Parish, JamaicaThornton Heath, United KingdomIsrealites
Jimmy CliffReggae
4/1/1948​
St. James Parish, JamaicaI can See Clearly Now
Lee "Scratch" PerryReggae
3/20/1936​
Kendal, JamaicaChase the DevilLee Scratch Perry's Vision of Paradise
Peter ToshReggae
10/19/1944​
9/11/1987​
Grange Hill, JamaicaKingston, JamaicaYou Can't Blame the YouthMurderRastafariStepping Razor: Red X
Peter ToshReggae
10/19/1944​
9/11/1987​
Grange Hill, JamaicaKingston, JamaicaLegalize itMurderRastafariStepping Razor: Red X
Peter ToshReggae
10/19/1944​
9/11/1987​
Grange Hill, JamaicaKingston, JamaicaGlass HouseMurderRastafariStepping Razor: Red X
Stephen MarleyReggae
5/19/1972​
Wilmington, DEMind Control
Stephen MarleyReggae
5/19/1972​
Wilmington, DEMedication
Stephen MarleyReggae
5/19/1972​
Wilmington, DEChase Dem
Stephen MarleyReggae
5/19/1972​
Wilmington, DEIron Bars
Stephen MarleyReggae
5/19/1972​
Wilmington, DEInna Di Red
Ziggy MarleyReggae
10/17/1968​
Kingston, JamaicaLookingShark Tale
Ziggy MarleyReggae
10/17/1968​
Kingston, JamaicaTrue to MyselfLife and Debt
Ziggy MarleyReggae
10/17/1968​
Kingston, JamaicaDragonflyI Am Bolt
Ziggy MarleyReggae
10/17/1968​
Kingston, JamaicaKeep My FaithPup Star
Ziggy MarleyReggae
10/17/1968​
Kingston, JamaicaKeep My FaithThe Strink is In

3rd Set

NameGenreBorn DateDied DateBorn LocationDied LocationParentsFavorite Songs1Favorite Songs2Favorite Songs3Favorite Songs4Favorite Songs5Cause of deathReligionMovies1Movies12Movies3Movies4Movies5
Bob MarleyReggae
2/6/1945​
5/11/1981​
Nine Mile, JamaicaMiami, FLNorval Marley, Cedella BookerCorner StoneRedemption SongMelanomaRastafariMarley
Buju BantonReggae
7/15/1973​
Kingston, JamaicaUntold Stories
Bunny WailerReggae
4/10/1947​
Kingston, JamaicaCool Runnings
Burning SpearReggae
3/1/1945​
St. Ann Parish, JamaicaOld Marcus Garvey
Damian MarleyReggae
7/21/1978​
Kingston, JamaicaBob Marley, Cindy BreakspeareWelcome to Jam RockMedication
Dennis BrownReggae
2/1/1957​
7/1/1999​
Kingston, JamaicaKingston, JamaicaThe Promised LandPneumothorax
Desmend DekkerReggae
7/16/1941​
5/25/2006​
St. Andrew Parish, JamaicaThornton Heath, United KingdomIsrealites
Jimmy CliffReggae
4/1/1948​
St. James Parish, JamaicaI can See Clearly NowMarley
Lee "Scratch" PerryReggae
3/20/1936​
Kendal, JamaicaChase the DevilLee Scratch Perry's Vision of Paradise
Peter ToshReggae
10/19/1944​
9/11/1987​
Grange Hill, JamaicaKingston, JamaicaYou Can't Blame the YouthLegalize itGlass HouseMurderRastafariStepping Razor: Red X
Stephen MarleyReggae
5/19/1972​
Wilmington, DEMind ControlMedicationChase DemIron BarsInna Di Red
Ziggy MarleyReggae
10/17/1968​
Kingston, JamaicaLookingTrue to MyselfDragonflyKeep My FaithShark TaleLife and DebtI Am BoltPup StarThe Strink is In

I appreciate the advise. Thank you
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
You can make it a bit shorter with count delimiter and maxcount
Rich (BB code):
SplitSongs = Table.SplitColumn(Group, "Favorite Songs", Splitter.SplitTextByDelimiter(", ", QuoteStyle.Csv), MaxCount),

This is a cool tip (y)
 
Upvote 0
Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Group = Table.Group(Source, {"Name"}, {
        {"Genre", each Text.Combine(_[Genre],", "), type text},
        {"Born Date", each Text.Combine(_[Born Date],", "), type text},
        {"Died Date", each Text.Combine(_[Died Date],", "), type text},
        {"Born Location", each Text.Combine(_[Born Location],", "), type text},
        {"Died Location", each Text.Combine(_[Died Location],", "), type text},
        {"Parents", each Text.Combine(_[Parents],", "), type text},
        {"Favorite Songs", each Text.Combine(_[Favorite Songs],", "), type text},
        {"Cause of death", each Text.Combine(_[Cause of death],", "), type text},
        {"Religion", each Text.Combine(_[Religion],", "), type text},
        {"Movies", each Text.Combine(_[Movies],", "), type text}
        }),
    MaxCountSongs = List.Max(Table.AddColumn(Group, "SCount", each List.Count(Text.Split([Favorite Songs],",")))[SCount]),
    MaxCountMovies = List.Max(Table.AddColumn(Group, "SCount", each List.Count(Text.Split([Movies],",")))[SCount]),
    SplitSongs = Table.SplitColumn(Group, "Favorite Songs", Splitter.SplitTextByDelimiter(", ", QuoteStyle.Csv), MaxCountSongs),
    SplitMovies = Table.SplitColumn(SplitSongs, "Movies", Splitter.SplitTextByDelimiter(", ", QuoteStyle.Csv), MaxCountMovies)
in
    SplitMovies
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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