0
votes

I need to data validate a column so that it only allow: A-Å, a-å, 0-9, Comma, dot, ?, !, -, +, (, ), :, <, >

I use this custom formula: =REGEXMATCH(A1:1,"[^a-zA-Z0-9\s]")

But I cannot get the dialog box to save the formula? and how do I get my regex to match my allowed characters?

Only if I exclude the = from the formula field but then the data validate does not work...

https://docs.google.com/spreadsheets/d/1_MeBbhL1nR1rF1JYGI2cpd88VAhqKJCgN25KS6STfWU/edit?usp=sharing

enter image description here

2

2 Answers

0
votes

use:

=REGEXMATCH(A1&""; "[a-zA-Z0-9\sÅå,\.\!\?\-\+\(\)\:<>]")
0
votes

It seems that your formula is correct but you just needs to correct the cell reference.

=REGEXMATCH(A1,"[^a-zA-Z0-9\s]")

Sample