Ask Your Question

Dynamic Cell Background Color [closed]

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

micnolmad gravatar image

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.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-21 22:34:24.384650

4 Answers

Sort by » oldest newest most voted

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

horst gravatar image

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.

edit flag offensive delete link more

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

this post is marked as community wiki

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

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.

edit flag offensive delete link more

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

m.a.riosv gravatar image

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.

edit flag offensive delete link more

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

qubit gravatar image

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...

edit flag offensive delete link more

Question Tools



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

Seen: 24,547 times

Last updated: Feb 16 '13