Problem:

Restricting the length of entries in column A to a maximum of 5 characters.

Solution:

Use Data Validation:
1. Select Column A.
2. Data  Data Validation  Settings  Custom
3. Enter the following formula in the Formula box:
=LEN(A2)
4. Click OK.

If an entry is longer than 5 characters, an error message will pop up, forcing the user to try again.