Custom Functions in Data Model

New Contributor

I'm trying to use a custom RegEx function I found in my Data Model table, however, the cell only displays the formula I entered instead of the return value. I've tested the function outside of the table and it works exactly as I would expect. I selected the referenced cells rather than typing it out and this is what Excel changed it to: =RegExpMatch('RegEx Patterns'!B2,[@[Text 1]])


Text 1 is the name of the referenced column, I tried changing it back to C4 and that didn't work. I also tried adding the table name from the data model after the @ but that didn't do anything either. Text 1 is highlighted like it's a live reference but B2 isn't for some reason. Any ideas why the function wouldn't work in this context? Oh, and the function pops up when I start typing in the workbook, but not when I try it in the Data Model. Not sure if that's related.

1 Reply
best response confirmed by Angoose884 (New Contributor)
Finally found an answer, just as simple as I assumed it was too... When entering a formula, make sure the format is not set to Text, otherwise it will only display the formula instead of the result. Couldn't find it because I was searching the wrong keywords, but hopefully this helps somebobdy else.