Counting characters

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
 
J

JLatham

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")
 
D

Dave Peterson

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).
 
H

Howard

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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top