Ask Your Question
1

Dynamic Cell Background Color

asked 2012-02-20 09:34:17 +0200

micnolmad gravatar image micnolmad
11 1 2 2

Hi, is it possible to have the cell color change from say red through the variations to blue according to how close a value is to a min. or max. value?

So value is 50, min is 0 max is 100. Cell color would be 50% red and 50% blue.

delete close flag offensive retag edit

4 Answers

Sort by » oldest newest most voted
1

answered 2013-02-16 02:22:36 +0200

horst gravatar image horst flag of United States
1875 11 30

In Lo3.6 and LO4.0 you can achieve this now very easy with Conditional Formating:

Select te range to format. Menue Format->Conditinal Formatting >Conditinal Formatting. In the wndow click Add, some prefilled drop-down boxes appear:

Select Top left: "All Cells" Center "Color Scale (2 Entries)",

Middle left: "Min", Right "Max",

Colors Red for Min and Blue for Max are predefined. You can play with the colors and settings.

Unfortunately there is so far no help available.

link delete flag offensive edit
1

answered 2012-02-23 08:12:06 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

updated 2012-02-23 08:12:06 +0200

fdf gravatar image fdf
1 1 3 6

I guess you don't want a simple conditional formating with options only equal, smaller, greater… but a proportionnal relation between colors and figures. I think only a special macro would do, in that case.

link delete flag offensive edit
0

answered 2013-02-16 00:55:17 +0200

qubit gravatar image qubit flag of United States
5816 3 50 43

updated 2013-02-16 00:56:53 +0200

Hi @micnolmad,

A similar feature is available in LO 3.6+:

Are you looking for some kind of gradient between the two colors? That might require a macro or even additional development in the LO codebase...

link delete flag offensive edit
0

answered 2012-02-24 00:25:54 +0200

mariosv gravatar image mariosv flag of Spain
5034 23 50

updated 2012-02-24 00:28:35 +0200

The problem to get it with conditional formatting is that you need to define one style for every color you need.

One trick is to use the STYLE function in the conditional formatting.

Select formula. and use a formula like: STYLE("Variation_"&FormulaForVariation)

If you have defined the styles: Variation_10 Variation_20 Variation_30 and the result of FormulaForVariation is 10 or 20 or 30, then you get the proper style applied.

link delete flag offensive edit

Login/Signup to Answer

Donate

LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!

Question tools

Follow
2 followers

subscribe to rss feed

Stats

Asked: 2012-02-20 09:34:17 +0200

Seen: 1,275 times

Last updated: Feb 16