let
Source = Table.NestedJoin(Sheet1, {"Column1"}, Sheet2, {"Column1"}, "Sheet2", JoinKind.LeftOuter),
#"Expanded Sheet2" = Table.ExpandTableColumn(Source, "Sheet2", {"Column4"}, {"Column4.1"}),
#"Removed Columns" = Table.RemoveColumns(#"Expanded Sheet2",{"Column4"}),
#"Promoted Headers" = Table.PromoteHeaders(#"Removed Columns", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"ID", type text}, {"Class", type text}, {"Mark", type text}, {"Attended", type text}})
in
#"Changed Type"