Is there a way to Add a column, in Power Query, by referencing data in a specific cell?
I want to take the text from "A4"
, use a Left(Right function
, and add that to a new column.
My VBA macro is: "Latest 4 Wks - Ending " & Left(Right(.Range("A4"), 24), 23)
Through further research, I found that by adding a Blank Query, I was able to add a column, in Power Query, by referencing data in a specific cell?
Insert BlankQuery Advance Editor
(YourWorkSheet as table ) as text=>
let
SheetCellA4 =YourWorkSheet[Column1]{3},
SplitByFrom = Text.Split(SheetCellA4, "to "){1},
SplitByTime = Text.Split(SplitByFrom, "`"){0}
in SplitByTime
The bring in the worksheet data
After the Source
line
#"Added Custom" = Table.AddColumn(Source, "Custom", each Query1(Source))
In
#"Added Custom"