Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to: text color depend on value


Anyone know how to make the text change colors, depending on what valu
certain data is? I'm sure it's easy...

--
bobsmith58
-----------------------------------------------------------------------
bobsmith58d's Profile: http://www.excelforum.com/member.php...fo&userid=1452
View this thread: http://www.excelforum.com/showthread.php?threadid=26148

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default How to: text color depend on value

Hi Bob,

Try using conditional formatting.

If you are not familiar with this feature, see Debra Dalgleish's excellent
tutorial at:

http://www.contextures.com/xlCondFormat01.html


---
Regards,
Norman



"bobsmith58d" wrote in message
...

Anyone know how to make the text change colors, depending on what value
certain data is? I'm sure it's easy....


--
bobsmith58d
------------------------------------------------------------------------
bobsmith58d's Profile:
http://www.excelforum.com/member.php...o&userid=14520
View this thread: http://www.excelforum.com/showthread...hreadid=261484



  #3   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default How to: text color depend on value


Hi Bob

Her is a chunk of code I use as you will see the relevant part
conditionally colour codes cell values

Range("w6").Select

For r = 1 To 230

For z = 1 To rowl
task = ActiveCell.Value

If Left(task, 1) = "" Then crt = Mid(task, 2)
If Left(task, 1) = "" Then ActiveCell.Value = crt
If Left(task, 1) = Chr$(126) Then crt = Mid(task, 2)
If Left(task, 1) = Chr$(126) Then ActiveCell.Value = crt
If task = "Not detected" Then ActiveCell.Value = "N/D"
If task = "n/a" Then ActiveCell.Value = "."
If task = "Listeria Monocytogenes" Then ActiveCell.Value = "L.mono"
If task = "To Follow" Then ActiveCell.Value = "T.F."
If task = "Listeria species not monocytogenes" Then ActiveCell.Value = "List
not mono"
If task = "Positive" Then ActiveCell.Value = "Pos"

Rem grading

If ActiveCell.Comment Is Nothing Then ADVERSE = 1
If ADVERSE = 0 Then ActiveCell.Font.ColorIndex = 5 <<<<<<<<<<<< This what
you want
If ADVERSE = 0 Then ActiveCell.Offset(0, -r).Select
ActiveCell.Offset(0, -21).Select
If ADVERSE = 0 Then ActiveCell.Font.ColorIndex = 5
If ADVERSE = 0 Then ActiveCell.Offset(0, r).Select
ActiveCell.Offset(0, 21).Select
ADVERSE = 0

ActiveCell.Offset(1, 0).Select
Next
"Norman Jones" wrote in message
...
Hi Bob,

Try using conditional formatting.

If you are not familiar with this feature, see Debra Dalgleish's excellent
tutorial at:

http://www.contextures.com/xlCondFormat01.html


---
Regards,
Norman



"bobsmith58d" wrote in message
...

Anyone know how to make the text change colors, depending on what value
certain data is? I'm sure it's easy....


--
bobsmith58d
------------------------------------------------------------------------
bobsmith58d's Profile:
http://www.excelforum.com/member.php...o&userid=14520
View this thread:
http://www.excelforum.com/showthread...hreadid=261484





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 17/09/2004


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help, My job may depend on it!!! Kev Excel Discussion (Misc queries) 9 May 3rd 07 05:02 PM
How can I have have one column's input depend on the variables in a second one? willb Excel Worksheet Functions 3 October 18th 06 12:31 PM
Cond. format text color based on another's text color manxman Excel Discussion (Misc queries) 3 August 31st 06 06:27 PM


All times are GMT +1. The time now is 03:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"