OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

conditional formatting& cell colors

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
utm1996
General User
General User


Joined: 25 Jul 2011
Posts: 45

PostPosted: Thu May 17, 2012 12:44 pm    Post subject: conditional formatting& cell colors Reply with quote

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
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Thu May 17, 2012 2:36 pm    Post subject: Reply with quote

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 https://forum.openoffice.org
Back to top
View user's profile Send private message
utm1996
General User
General User


Joined: 25 Jul 2011
Posts: 45

PostPosted: Fri May 18, 2012 6:19 am    Post subject: Reply with quote

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
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Fri May 18, 2012 6:23 am    Post subject: Reply with quote

http://user.services.openoffice.org/en/forum/viewtopic.php?f=21&t=6039
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group