| View previous topic :: View next topic |
| Author |
Message |
utm1996 General User

Joined: 25 Jul 2011 Posts: 45
|
Posted: Thu May 17, 2012 12:44 pm Post subject: conditional formatting& cell colors |
|
|
I know that conditional formatting can be used to set the color of a cell based on ...whatever. And that Conditional formatting only has 3 possible conditions.
If I want to change the color of a cell based on the value of it (where the value ranges between 1 & 16) and have a different color for each value. Is there another way I can do this, or am I simply limited to 3 conditions (and 3 colors).
A1=1 cell b2 is yellow
a1=2 cell b2 is peach
.
.
.
a1=16 cell b2 is brown
Thanks
-Dale
OOo 3.3.0 |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Thu May 17, 2012 2:36 pm Post subject: |
|
|
A combination of function STYLE and conditional formatting can do that like this:
Condition #1
Formula is: STYLE(VLOOKUP($A1;StyleList;2;0))
with StyleList being a 2-column lookup table with values in the first column and style names in the second column. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
utm1996 General User

Joined: 25 Jul 2011 Posts: 45
|
Posted: Fri May 18, 2012 6:19 am Post subject: |
|
|
Thanks Villeroy, I'm sure it'll work.
It doesn't look to different then using the Index feature. _________________ ------------
OOo 3.3
------------ |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
|
| Back to top |
|
 |
|