insert Regex trick at any step (mid?) Advanced Editor

ooptennoort

Board Regular
Joined
Mar 29, 2021
Messages
66
Office Version
  1. 365
Platform
  1. Windows
Trying to use run the Regex trick (that members Grah and Bo_Ry skillfully adapted for this case), I run into a problem which might have to with my worksheet not being a table. The error text is:

Expression.Error: The field 'Comment' of the record wasn't found.
Details:
Name=Sheet1
Data=


Item=Sheet1
Kind=Sheet
Hidden=FALSE


The Regex trick in this case was:

let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Regex = Table.AddColumn(Source, "Regex", each Text.Combine(Json.Document(Web.Page(
"<meta http-equiv='X-UA-Compatible' content='IE=edge'> <script>
document.write(JSON.stringify('"& [Comment] &"'.match(/\d+[A-Z]-\d+-\d+/g)));
</script>")[Data]{0}[Children]{0}[Children]{1}[Text]{0}),", "))
in
Regex


My question:
Maybe if I'd simplify my workbook, convert to range etc. I could get the trick to work but... why not reach higher: can the Regex trick be altered to be inserted anywhere, at any step, in the Advanced Editor? If so, how? If not (most likely), could anyone pls direct me to literature where I can read why not (and maybe even learn to make a workaround)?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,216,165
Messages
6,129,235
Members
449,496
Latest member
Patupaiarehe

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top