Hello Excel Family,
I found a code from Pivotor to auto delete blank rows and columns from a table. Can somebody (couldn't find Pivotor) to help me putting in the VBA Editors?
Much appreciate!
Taha
I found a code from Pivotor to auto delete blank rows and columns from a table. Can somebody (couldn't find Pivotor) to help me putting in the VBA Editors?
Power Query:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Reorganized = Table.FromColumns({Table.ColumnNames(Source),Table.ToColumns(Source)}),
#"Added Custom" = Table.AddColumn(Reorganized, "IsNull", each if List.NonNullCount(List.Distinct([Column2]))=0 then "Yes" else "No"),
#"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([IsNull] = "No")),
#"Clean Table" = Table.SelectColumns(Source,Table.Column(#"Filtered Rows","Column1"))
in
#"Clean Table"
Much appreciate!
Taha
Last edited by a moderator: