Forum Discussion
maericson
Dec 07, 2023Copper Contributor
Excel EVAL() function does not support structured table references
I sometimes create complex lambda() to dynamically create a function string intended for EVAL(). The latest use required structured table references within that dynamically created function string. ...
peiyezhu
Dec 07, 2023Bronze Contributor
wondering why EVAL doesn't work on any function equally.
This is the true.
I guess there maybe another way if share some data.
This is the true.
I guess there maybe another way if share some data.
- maericsonDec 07, 2023Copper ContributorIn short, I am trying to create some data-driven calculations. I am importing multiple generated CSV files using "Get Data (Power Query)" regularly. The CSV format might change (added columns, order of columns) so originally I was building the calculations by hand for each sheet/csv-import using structured table references.
That became very tedious when adding CSV input, or when there were changes needed in the formula. So, I came up with the idea of having some 'metadata' for each sheet from which I can dynamically create the formula and only need to update the column names in that metadata.
It all works great except that there seems to be a bug or limitation in EVAL(). My best workaround for now is to copy and paste the dynamically generated formula into the sheets.
I suppose I could dynamically generate a formula with match and index, but that would be unfortunate given the covenience of structured table references.