Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


At 10:54 18/03/2013 +0100, Joris Kinable wrote:
Given are a number of cells with values, say for example B2, E2, G2. I want to color the cell containing the smallest value green. In case there are multiple cells contain the same (smallest) value, all these cells must be colored green.

First create a cell style for your green colour:
o Go to Format | Styles and Formatting (or press F11 or click the Styles and Formatting button in the Formatting toolbar).
o Click the Cell Styles button at the top of the Styles and Formatting window.
o Click the "New Style from Selection" button.
o Give your new style a name - perhaps "Green"?
o Right-click on the new style name in the list and select Modify... .
o On the Background tab, select your shade of green.

Now to colour the cells:
o In the corresponding cell of a new column, let's say K (so in K2), insert the formula =MIN(B2;E2;G2) .
o Select, say, B2.
o Go to Format | Conditional Formatting... .
o For Condition 1 (ticked), select "Cell value is" and "equal to".
o In the third box, type $K2.
o For Cell Style, select "Green", and click OK.
o Repeat for E2 and G2.

Next I would like to do the same for {B3, E3, G3}, {B4, E4, G4}, ....

If appropriate (as it presumably will be), you can very easily fill the columns down from the original cells in row 2. You'll need to fill down column K too, of course.

If you wish, you can hide column K or you can choose to put it out of the way - outside your print range - or even on a separate sheet.

I trust this helps.

Brian Barker


--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.