Search code examples
google-sheetsgoogle-sheets-formula

How can I prevent users from entering non-alphanumeric characters in a Google Sheet


I tried using the Data Validation on the column H by applying the custom formula: =REGEXMATCH(H1, "^[a-zA-Z0-9]+$"); but to no avail, Google Sheets tells me that this formula is invalid. Back in 2020 it worked. Did Google change something? enter image description here


Solution

  • From the screenshot it looks like the sheet locale uses semicolon ; convention instead of ,

    go with =REGEXMATCH(A1; "^[a-zA-Z0-9]+$")