|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
let
源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
left = List.FirstN( Table.ToColumns(源) ,5),
right = List.Skip( Table.ToColumns(源) ,5),
combine = Table.Combine( List.Transform( List.Split( right ,2) ,each Table.FromColumns( left &_ ) ) ),
筛选的行 = Table.SelectRows(combine, each ([Column6] <> " ")),
筛选的行1 = Table.SelectRows(筛选的行, each [Column6] <> null and [Column6] <> ""),
已透视列 = Table.Pivot(筛选的行1, List.Distinct(筛选的行1[Column6]), "Column6", "Column7", List.Sum),
重命名的列 = Table.RenameColumns(已透视列,
List.Zip({
List.FirstN(Table.ColumnNames(已透视列),5),
List.FirstN(Table.ColumnNames(源),5)
})
)
in
重命名的列 |
|