Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: changing text colour when a character length is exceeded 1

Status
Not open for further replies.

keywordmonkey

IS-IT--Management
Joined
Mar 16, 2003
Messages
20
Location
GB

I want to be able to automatically change the text colour to red if the user types more than a set number of characters (including spaces).

So if I set the limit was 75 for D1, I'd want the text to go red if they typed 80.

I've seen this done, I think without a macro, and can't find any data validation options etc to do this.

Ideas anyone?
 
Click on the cell in question (Assuming A1 here), do Format / Conditional Formatting - Change 'cell value is' to 'formula is' and then in the white box to the right put the following formula, adjusting for whatever your cell reference is:-

=LEN(A1)>75

Now hit the format button in the dialog box, select a format and hit OK till you are out.

If you want to copy this format to other cells then just use the format painter.

Regards
Ken.......
 
Excellent - worked first time. Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top