Data VAlidation - Text Length & Character Type

2019-09-15 19:47发布

I would like to add some data validation on a cell in the Excel 10. I would like to force the user to enter a string that is 9-char long, with the first 8 char as digits, and the last char an Upper letter.

Thanking u in advance

标签: excel
1条回答
相关推荐>>
2楼-- · 2019-09-15 20:46

this formula could help:

=and(isnumber(left(A1,8)+0),len(A1)=9,code(right(A1))>=65,code(right(A1))<=90)
  • isnumber(left(A1,8)+0) = with the first 8 char as digits
  • len(A1)=9 = 9-char long
  • code(right(A1))>=65,code(right(A1))<=90 = char between "A" and "Z"
查看更多
登录 后发表回答