I would like to add some data validation on a cell in the latest Excel. I would like to force the user to enter a string that is two-char long, with the first char a digit,
For the first part you will need a formula such as this for Data Validation
=AND(LEN(A1)=2,ISNUMBER(VALUE(LEFT(A1,1))),CODE(RIGHT(LOWER(A1),1))>=97,CODE(RIGHT(LOWER(A1),1))<=122)
This part runs a case insensitive test for a letter between a to z CODE(RIGHT(LOWER(A1),1))>=97,CODE(RIGHT(LOWER(A1),1))<=122)
ISTEXT(RIGHT(A1,1)))
will validate characters other than a-z to being text as it is a string test, even numbers will be allowed. This is why the VALUE
portion of (VALUE(LEFT(A1,1)))
is needed to force a numeric evaluation of the first position in the string