![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 2
|
Can anyone tell me how I can change the colour of the text in a cell once the text in that cell reaches a certain length, say 80 characters long
|
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
=len(a1)>=80 ... FONT Color --> 'red' This will format the color of the text red if the text you have entered is more than 80 characters. It is not going to capture the length of the string as the text is being typed -- for that you may have to adopt DATA|VALIDATION. Hope This Helps!
__________________
Regards! Yogi Anand, D.Eng, P.E. Energy Efficient Building Network LLC www.energyefficientbuild.com |
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: May 2002
Posts: 13,278
|
Use conditional formatting & the LEN function:
select the cell(s) you want to format. Go to format - conditional formatting. Change 'cell value is' to 'formula is'. Enter the appropriate formula, for example: =len(A1) > 80 Click the format button & select the format you want to apply.... Paddy |
|
|
|
|
|
#4 |
|
New Member
Join Date: May 2002
Posts: 2
|
Thanks Yogi & Paddy,
Is it possible to do this real time (ie the moment the string they are typeing exceeds 80 chars rather than when they exit the cell? |
|
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
For real time capture of the length of the string, you will have to use VBA. Regards! |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|