Exact number of digits in a cell

  • Thread starter Thread starter roger lewis
  • Start date Start date
R

roger lewis

Sorry to post simple question in this forum but I need to use a function key
to check if the correct number of digits are in a cell. I presume it would
work such as 6 digits entered True, 4 or 7 False. I have tried a number of
books but am struggling a little. Help very much appreciated.

Roger
 
You can use the len function to return the # of characters in a cell.
i.e. =if(len(a1)<>6,"You entered the wrong # of characters","You
entered the right # of characters") ----does the following if a1 does
not equal 6, says you entered the wrong # otherwise says you entered
the right number


depending on your needs you can also use data validation (go to Data->
Validation) accomplish this.
 
Back
Top