Displaying cell values in different colours depending on value
Displaying cell values in different colours depending on value
(OP)
Hi, all.
Does anyone have a way of colour coding cell values (in Excel) conditionally?
(eg, if a stress value exceeds allowable, display it in red, if OK display it in green)
I would enthusiastically propose any simple working solution for 'Eng-Tip of the Year'
Does anyone have a way of colour coding cell values (in Excel) conditionally?
(eg, if a stress value exceeds allowable, display it in red, if OK display it in green)
I would enthusiastically propose any simple working solution for 'Eng-Tip of the Year'





RE: Displaying cell values in different colours depending on value
RE: Displaying cell values in different colours depending on value
Brilliant (or was I the only user not to know about that trick?). That IS enough to get me going.
I am running version 7.0 of Excel, which is not very forthcoming about conditional formatting - no mention in the drop-down format menu, but after seeing your post I found a couple of cryptic lines in one of the help screens. I guess that you may be using a more recent version?
Applying one of the sample custom formats which included 'red' in the string I have already achieved something along the lines I was looking for (all negative values came out red). So again, many thanks.
RE: Displaying cell values in different colours depending on value
Glad to hear that you've got it straightened out.
RE: Displaying cell values in different colours depending on value
Yes, this came with Office Pro for Windows 95.
I am glad to report that I have now achieved what I wanted.
This query came from a colleague of mine who mentioned a couple of days ago that he had wanted to display with conditional colours, and didn't know how to do it.
I confidently told him that someone in the eng-tips community would surely know, so you have upheld the honour of the group
RE: Displaying cell values in different colours depending on value
RE: Displaying cell values in different colours depending on value
With Worksheets("Hoja1").Range("d8")
Select Case .Value
Case Is > 100
.Interior.ColorIndex = 6
Case Is < 100
.Interior.ColorIndex = 3
End Select
End With
RE: Displaying cell values in different colours depending on value
Best Regards
Morten
RE: Displaying cell values in different colours depending on value
That was an answer to Mac7000, how to work around the three conditions, the limit in Excel ...
Regards
Dario
RE: Displaying cell values in different colours depending on value
With Worksheets("Hoja1").Range("d8")
Select Case .Value
Case Is > 100
.Interior.ColorIndex = 6
Case Is < 100
.Interior.ColorIndex = 3
End Select
End With
RE: Displaying cell values in different colours depending on value
Regards
RE: Displaying cell values in different colours depending on value
I like to program as much as the next guy but this works better.
Best Regards
Morten
RE: Displaying cell values in different colours depending on value
The problem is not the number of cells but the number of conditions (limited to three conditions in Excel 97 for Windows NT)
Regards
RE: Displaying cell values in different colours depending on value
i've been looking for this min weeks... search finally over... thanks...
RE: Displaying cell values in different colours depending on value
RE: Displaying cell values in different colours depending on value
Say for instance that you wanted the values in your spreadsheet colored four different colors,, red = <0, blue = >0 and <20, green = >20 and <40, black = >40 and <60 etc,
then you can only achieve this in excel by writing a code using "select case" as described by ardilesd. The above is not possible using the excel interface, at least not in excel 2000 anyway.
RE: Displaying cell values in different colours depending on value
Thanks for the thread.