Forum Discussion
Using custom data validation with regex on cells
I am pretty sure there is no support for regular expressions within Excel formulas. 365 insider beta, in particular, will allow you to write functions that perform the tasks you require but not by using Regex. For a modest cost it is possible to license libraries that use Regex.
FastExcel V4 SpeedTools (decisionmodels.com)
The following worked for me (using the addin)
= Rgx.AMATCHES2("\b(yes|no)\b", string)
= Rgx.AMATCHES2("^[a-zA-Z]*$",string)
- s0p3rAug 27, 2021Copper Contributor
Thank youPeterBartholomew1
I will probably stick to google sheets if that's the case.
The document need to be given to other people to use And if i will use 365 insider or some other solution, it wont work those people probably. Cause they will have other versions of office.
- PeterBartholomew1Aug 27, 2021Silver Contributor
I see you point. If you share with people that use Google sheets it make sense to retain compatibility. The particular add-in that I showed comes with a run-time version that can be shipped to clients (involves a one-off fee).
For me the issues are very different. Having once described the A1 notation as an abomination that should never have entered the world of the electronic spreadsheet, I am only too happy to enter the world of dynamic arrays and build solutions as if they were regular code.