Dear community,
I am working on an AppSheet App and I need to validate the entry of a CIF/NIF (fiscal number from Spain)
I'm trying to use the citated formula, but it doesn't work and I can't find the error
The format to be validated is 9 characters long.
The first is a letter (A to Z) and is followed by eight numbers (0 to 9):
Example: A12345678 or B87654321 or D45781245
the valid_if formula in a Text column is:
AND(
LEN([_THIS]) = 9,
AND (NUMBER(MID([_THIS],1,1))=0, MID([_THIS],1,1) <> "0"),
OR(NUMBER(RIGHT([_THIS],8)) > 0, RIGHT([_THIS],8) = "00000000")
)
thanks in advance for the help.
Please try a valid_if expression of
AND(LEN([_THIS])=9,
ISBLANK(NUMBER(LEFT([_THIS],1))),
NUMBER(RIGHT([_THIS],8))>0,
ISNOTBLANK(EXTRACTHASHTAGS(CONCATENATE("#",LEFT([_THIS],1)))),
LEFT([_THIS],1)<>"_",
FIND(UPPER(LEFT([_THIS],1)),LEFT([_THIS],1))<>0
)
I believe the expression will also take care of invalidating the data entry if
Please test well for multiple test cases. ๐
User | Count |
---|---|
43 | |
27 | |
23 | |
14 | |
12 |