Forum Discussion
How to use m code with (Left(Right(.Range to extract data from a cell?
- 5 years ago
Hi Anonymous
Please try this, I've tested it and it works on the string you provided. What makes this tricky is that the last character in the string is not an apostrophe,it's a back tick ` The character under the tilde key which is at the top left of my keyboard.
let Source = Excel.CurrentWorkbook(){[Name="cellA4"]}[Content], Substr = Table.AddColumn(Source, "Substring", each Text.Middle([Column1] , Text.PositionOf([Column1], ":", 1) + 1 , Text.PositionOf([Column1], "`") - Text.PositionOf([Column1], ":", 1) - 1)) in SubstrPhil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Hi Anonymous
Please try this, I've tested it and it works on the string you provided. What makes this tricky is that the last character in the string is not an apostrophe,it's a back tick ` The character under the tilde key which is at the top left of my keyboard.
let
Source = Excel.CurrentWorkbook(){[Name="cellA4"]}[Content],
Substr = Table.AddColumn(Source, "Substring", each Text.Middle([Column1] , Text.PositionOf([Column1], ":", 1) + 1 , Text.PositionOf([Column1], "`") - Text.PositionOf([Column1], ":", 1) - 1))
in
Substr
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.