|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
let
AAA = Excel.CurrentWorkbook(){[Name="表3"]}[Content],
BBB = Table.ToRows(AAA),
CCC = List.Transform(BBB, (x)=> List.FirstN( List.Combine( List.Generate(()=>0, each _<List.Count(x), each _+1, each if List.ContainsAll({"语文","数学","英语"},{x{_},x{_+1}}) then {x{_}}&{null} else if x{_} is null then {null} else {x{_}} )),7)),
DDD = Table.FromRows(CCC)
in
DDD
let
AAA= Excel.CurrentWorkbook(){[Name="表3"]}[Content],
BBB= Table.ToRows(AAA),
CCC = List.Transform( BBB,(z)=> List.FirstN( List.Accumulate({0..List.Count(z)-1},{},( x ,y )=> if List.ContainsAll({"语文","数学","英语"},{z{y},z{y+1}}) then x&{z{y}}&{null} else x&{z{y}} ),7)),
DDD = Table.FromRows(CCC)
in
DDD
|
|