SOLVED

Excel 2010 setting rule for digit count

Copper Contributor

Hi there,

I am trying to set a rule in Excel 2010, to highlight the cell if there are more or less than 10 digits entered.

Our users have ID numbers that are 10 digits long, and people have been accidently adding more numbers, or leaving them out.

IE: 1234567890 will be entered as 123456789 or as 12345667890.

 So I am trying to make the space highlight red if there are the incorrect number of digits in the cell. Can anyone help me create the rule for this?

4 Replies

bmccutch98,

 

=LEN(A1)<>10
best response confirmed by bmccutch98 (Copper Contributor)
Solution

Hi,

 

You may use conditional formatting with the rule like

=LEN(A1)<>10

applying it to all your cells

 

Perfect, and is there a way to apply this rule and it not highlight the blank cells as well?

Just add the AND condition

 

=(LEN(A1) <> 10)*(LEN(A1) > 0)
1 best response

Accepted Solutions
best response confirmed by bmccutch98 (Copper Contributor)
Solution

Hi,

 

You may use conditional formatting with the rule like

=LEN(A1)<>10

applying it to all your cells

 

View solution in original post