A formula limiting the no. of characters

  • Thread starter Thread starter Mon
  • Start date Start date
M

Mon

Hi everyone,

I need a formula to do the following:

When you input text into a cell in Excel, but you do not want the tex
to go over a certain amount of characters (e.g. 40 characters pe
line). If you do go over that certain number, the extra text should no
be seen.

Can any one help me?

THANK YOU!
 
Hi
though not quite exactly what you want: I'd use data validation:
- select the cell for text entry (lets say cell A1)
- goto 'Data - Validation'
- choose 'custom' and enter the formula:
=LEN(A1)<=40

This will restrict entries with more than 40 characters
 
You can use Data Validation to restrict the length of the entry --

Select the cell
Choose Data>Validation
Choose to Allow: Text Length
Choose Data: Less than or equal to
For Maximum, enter 40

but you will only be able to enter 40 characters or fewer.

If you type more than 40 characters, you'll see an error message, and
will be asked to retry, or cancel.

Another option would be to enter the data in one column, and use a
formula in an adjacent column, to display the first 40 characters. For
example, with the data in cell A2, enter the following formula in B2:
=LEFT(A2,40)
 
Back
Top