Excel – Limit Excel cell entry to a certain number of digits

cellsflagmicrosoft excel

How can one fix the number of digits entered in a cell. For instance, I want only 9 digits to be entered in a cell and if it's more or less it should be flagged or not accepted. I want to make sure that junior staff don't miss digits when entering data.

Best Answer

You can use the data validation (Ribbon > Data > Data Validation) to control it.

Allowing a 9 digit number only, is equivalent to allowing numbers between 100,000,000 and 999,999,999.


If you want to simply flag it instead, you should use a conditional formatting, if the number is not between 100,000,000 and 999,999,999.

Related Question