I have a box in a form that needs the user to enter a project number. The project number format is ##-###. Is there anyway to make sure the entry matches this format? I don't want users to put in project numbers that are not the right format.
Solved! Go to Solution.
Try this:
AND(
COUNT(SPLIT([_THIS], "-")) = 2,
LEN(INDEX(SPLIT([_THIS], "-"), 1)) = 2,
OR(INDEX(SPLIT([_THIS], "-"), 1) = "00",
NUMBER(INDEX(SPLIT([_THIS], "-"), 1)) > 0),
LEN(INDEX(SPLIT([_THIS], "-"), 2)) = 3,
OR(INDEX(SPLIT([_THIS], "-"), 2) = "000",
NUMBER(INDEX(SPLIT([_THIS], "-"), 2)) > 0)
)
One easy way to figure out missing parenthesis is to place the matching closing parenthesis under the function it belongs to. something like this:
AND(
COUNT(
SPLIT([_THIS], "-")
) = 2,
LEN(
INDEX(
SPLIT([_THIS], "-"),
1
)
) = 2,
OR(
INDEX(
SPLIT([_THIS], "-"),
1
) = "00",
NUMBER(
INDEX(
SPLIT([_THIS], "-"),
1
)
?? > 0
),
LEN(
...
)
)
User | Count |
---|---|
34 | |
11 | |
3 | |
2 | |
2 |