How to make IF logical expression equal to any 5 digit value

  • Thread starter Thread starter yalex
  • Start date Start date
Y

yalex

I wanted to see if there is any way to make the logical expression of an
IF statement equal to any 5 digit value.

Ex: =IF(B2=?????, ....

If the value in B2 is a 5 digit value then it is true and false if it
is not.

-yalex
 
Try something like the following formula:

=IF(AND(ISNUMBER(B2),LEN(B2)=5),"yes","no")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top