0

I'm looking for a validating formula, that should be applied to the first column of my list (an ID column).

I would like to prevent users typing special characters, like: '.', ':', '?' and so on.. I've found this formula here but it's not working for me:

=AND(IF(ISERROR(FIND(",",
[ColumnName])),TRUE),IF(ISERROR(FIND("&",
[ColumnName])),TRUE),IF(ISERROR(FIND("!",
[ColumnName])),TRUE),IF(ISERROR(FIND("@",
[ColumnName])),TRUE),IF(ISERROR(FIND("~",
[ColumnName])),TRUE),IF(ISERROR(FIND("#",
[ColumnName])),TRUE),IF(ISERROR(FIND("$",
[ColumnName])),TRUE),IF(ISERROR(FIND("%",
[ColumnName])),TRUE),IF(ISERROR(FIND("*",
[ColumnName])),TRUE),IF(ISERROR(FIND("(",
[ColumnName])),TRUE),IF(ISERROR(FIND(")",
[ColumnName])),TRUE),IF(ISERROR(FIND("-",
[ColumnName])),TRUE),IF(ISERROR(FIND("+",
[ColumnName])),TRUE),IF(ISERROR(FIND(":",
[ColumnName])),TRUE),IF(ISERROR(FIND(";",
[ColumnName])),TRUE),IF(ISERROR(FIND("[",
[ColumnName])),TRUE),IF(ISERROR(FIND("]",
[ColumnName])),TRUE),IF(ISERROR(FIND(".",
[ColumnName])),TRUE),IF(ISERROR(FIND("/",
[ColumnName])),TRUE),IF(ISERROR(FIND("\",
[ColumnName])),TRUE))

It keeps saying: Something went wrong Can someone help me?

Thanks in advance, Luca

1 Answer 1

0
= AND(IF(ISERROR(FIND("~",RandomField)),TRUE),
    AND(IF(ISERROR(FIND("@",RandomField)),TRUE),
        AND(IF(ISERROR(FIND("!",RandomField)),TRUE),
            AND(IF(ISERROR(FIND(",",RandomField)),TRUE),
                IF(ISERROR(FIND("&",RandomField)),TRUE)))))

The AND() function takes two parameters, so you need to nest multiple AND clauses like the example I have given you.

I hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.