Cell Formatting
grahammal wrote:
How can I format a cell so that it will only allow seven digits to be
entered.
It must not allow less or more than seven.
Assuming that leading zeros are allowed/expected:
1) Select the cell
2) Press Ctrl-1
3) On the Number tab select Custom
4) In the Type box type 0000000
5) Click OK
6) Go to Data-Validation
7) On the Settings tab select Allow Custom
8) Assuming that the cell in question is F8 in the Formula box type:
=AND(ISNUMBER(F8),(LEN(TEXT(F8,"0000000"))=7))
9) Click OK
|