Excel : Data Validation, how to force the user to enter a string that is 2 char long?

后端 未结 6 1236
梦谈多话
梦谈多话 2021-01-14 23:56

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,

6条回答
  •  情深已故
    2021-01-15 00:27

    Jerome,

    In case you want to resolve this without VBA, you could

    • use a (hidden) sheet where you enter all 260 combinations 0A through 9Z in one column.
    • Give this range a name e.g. "MyList".
    • go to your input sheet (e.g. A1) and use data validation, selecting the "list" option.
    • In the source field, click [F3] to select "MyList".

    If you need this data in uppercase, you can use the formula =UPPER(A1) where ever you use the input.

提交回复
热议问题