Skip to main content

How to Change Cell Background Color by Cell Value in Open Office



First, the Reasonable Question.

Why would anyone want the background color of the cells in their spreadsheet to change with different values of data?

Sometimes it is convenient.  Suppose you are tracking multiple lab values across time.  Wouldn’t it be great to have a low value be blue, WNL green, and high value pastel red?

With changing colors, you can tell at a glance what the data trends are for multiple measurements. 
If your patient's Potassium starts low and keeps climbing, you could, for example, see a color change from Low Blue to Green to Red.  Just a glance tells you to pay attention, where bare black numbers on a white background might not catch your attention.

 And if you want to pay attention to particular numbers, the data number is still going to be in the cell for review.

This feature can be applied to other types of data as well.  I use it in my CE-tracking spreadsheet to keep track of multiple finicky sub-requirements in the three regions for which I am licensed.

Here's how you do it:

1)      Define Styles to match your lab value ranges.
I defined them as:  CritLow = Aquamarine, Low= Light Grey, WNL=Green  Hi=pink Crit Hi = Red

Create a Style:
Go to Format à Styles and Formatting [F11].
Click ‘Cell Styles’ icon in upper left of dialog box.
Use DownArrow to select ‘Custom Styles’ at bottom of dialog box.
Right-Click in Dialog Box, then click on [New] Popup.
Name:  LowValue
Linked With:  Default
Category: Custom Styles
Select ‘Background’ from tabs at top of dialog box.  A color palette appears.  I selected ‘Gray1’.  The color appears in the sample box at right.
Click [OK] at bottom of Cell Style Box to save.
You can also specify italics, bold text, etc with other tabs at the top of the Cell Style Box.

2)      Enter high and low values for your labs in date range columns. 
For example, ANC might have a normal range of 2 to 10, so the Low Value column would be “2” and the High Value Column would be “10.”  For this example, suppose that the Low Value cell address is B6 and the High Value cell address is C6.
Enter “1” into A6 for Critically Low Value definition.

3)      Click or highlight the cell(s) to apply formatting.

If the lab result dates are in a row from left to right, you would highlight, in this case, Row 6 from D6 onward to the right, since it will contain your lab data.

Click Format/Conditional Formatting
      You can have up to 3 conditions.  For this example, we will use LowValue, CritLow, and HiValue.

            Condition 1
            Be sure box is checked.
            Cell value is:    less than          $B6  -- Because we want to refer to the low range value as a fixed address in this column.  This will allow us to copy the settings horizontally if needed.  $B$6 would also work, but does not allow us to copy settings downward for other rows of lab values without manually entering the formulas for each row.

Cell Style:  LowValue.

Check the ‘Condition 2’ box.
Cell Value is :  Less than   $A6
Cell Style: CritLow

Check the ‘Condition 3’ box.
Cell Value is;  Greater than  $C6
Cell Style   HiValue

Click OK to save settings.

4)      Test the settings.
Enter values into the boxes to make sure the ranges are set up correctly.
If you have another row of lab values with different Crit Low, Low and Hi values, you can check the copyability of the settings by copying the data line downward and seeing if the new line obeys the limits defined by hi and low values.





Comments

Popular posts from this blog

Installing HR Block Tax Software in Ubuntu Linux using Codeweavers Crossover

Running HR Block 2017 Tax Software in Ubuntu Linux  Using CodeWeavers Crossover 2017 US taxes are due to be filed by midnight on April 18, 2018. It will surprise no one that a lot of people have waited to the last minute to start filing. At 9:30 PM, I got a call from a young relative who needed to do his taxes for the first time ever. He is a Linux enthusiast, and does not have a Windows or Apple/Mac computer. I thought I would try installing HR Block 2017 Tax Software on the Linux side of my laptop. 1) Obtain and install Codeweavers Crossover for Linux This software allows you to run many Windows apps in Linux-- https://www.codeweavers.com/ 2) Download the HR Block Windows tax software package. This year, its available from www.hrblock.com/2017/DELUXEWIN You will need an activation code, which should be provided when you buy the package. The default download location is /home/yourname/Downloads/ The app’s ...

How to get AAX Audiobook files into Audible Manager

How to get AAX files into Audible Manager – 20180121 My System; Lenovo ThinkPad E440 running Windows 7 64-bit running Audible Manager 5.5.0.8 My MP3 player – Sansa Fuze THE PROBLEM I can download .AAX files from my Audible account to my windows PC, but cannot get them into the Audible Manager. For several years, I have had to manually import audiobook files into the Audible Manager after downloading them from Audible. The usual process was to download the new Audiobook to the default location, C:\Users\Public\Public Documents\Audible\Downloads I would then start up the Audible Manager's army green box. Clicking [File] and selecting [Add Audio Files] in the upper right corner would take me directly to the default file location, where all of the previous downloads reside. I would then left click on the file, and click the [Import] tab at the bottom of the page to import my new AAX Audio file into Audible Manager. Once it was there, I could l...

Critter-Resistant Planter Box

“Never a horse that couldn’t be rode, Never a rider that couldn’t be throwed.” –Cowboy Proverb I had an old, neglected planter box in my yard.  It was full of weeds, and the last couple of times I have tried to plant something in it, the voles took out the roots of my plants, and the deer and raccoons took out the tops.   When we had tree cutters take down a dead cedar tree, they cut the trunk into 16 inch logs.  I had an idea about using them to revitalize the planter and discourage the critters from eating everything.  There was no guarantee that this idea would work, or will work for every critter– But, worth a try! Here’s the planter, somewhat before renovation: The borders of the old box were nearly rotted into mulch; The old box was 4 x 8 feet.  It had good soil inside it, although full of weeds and roots.    1) Strain the soil. I laid down a blue tarp and put a piece of metal hardware cloth on top of it.  I shoveled dirt from the plant...