Counting characters

  • Thread starter Thread starter Howard
  • Start date Start date
H

Howard

Is there any way to count characters (spaces included) in a cell to insure
that the characters in a specific cell do not exceed a preset number?
Thanks everyone
 
Easy way to do it is to use Data --> Validation and choose 'Text Length' as
the type of validation to use. Then you can set min/max/exact length to
allow for the cell.

Another way would be to use another cell to check the length. Say you want
to check A1 for length:
=IF(LEN(A1)<>20,"Not 20 characters","Is 20 Characters")
 
You could use data|validation to limit the number of characters. The user will
get an error message when they finish typing the value and hit enter (or try to
leave the cell).

Another option would be to use an adjacent cell and give a warning message:

=if(len(a1)<10,"","<--Too long. Can't exceed 9 characters")

And format in big, bold, red letters.

The user will be able to enter the value and will will have to react to the
error message (if they want).
 
Thanks, just what I needed.
--
Howard


JLatham said:
Easy way to do it is to use Data --> Validation and choose 'Text Length' as
the type of validation to use. Then you can set min/max/exact length to
allow for the cell.

Another way would be to use another cell to check the length. Say you want
to check A1 for length:
=IF(LEN(A1)<>20,"Not 20 characters","Is 20 Characters")
 
Back
Top