Counting characters in Excel

P

patsfan

Using Microsoft Excel, I need to keep the amount of characters in a column
below 30. I think some are more than that. Using a formula in one column,
can I ask the software to count the number of characters in another column so
I don't have to manually count? Or if it is easier can I just ask it to cut
off the characters after 30?
 
M

Max

Assume data in A1 down

In B1: =LEN(A1)
will return the count of characters

In C1: =LEFT(A1,30)
will return the leftmost 30 characters

You could select B1:C1 and copy down as far as required

If you are setting it up to restrict data entry to < 30 characters, try data
validation

Assume data to be entered in E1 down
Select col E, click Data > Validation,
Allow: Custom
Formula: =LEN(E1)<30
Click OK
 
T

T. Valko

Let's assume the column in question is column A.

You can enter this formula in column to count the characters:

=LEN(A1)

Copy down as needed.

You can also set data validation to not allow entries over 30 characters.
However, this can be defeated by copying/pasting into a validated cell or by
drag -n- drop.

Select the range of cells where you want this to apply.
Goto Data>Validation
Allow: Text Length
Data: less than or equal to
Maximum: 30
OK out
 

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