Conditional Formatting is used to apply formats to a cell or range of cells in spread design, and have that formatting change depending on the value of the cell or the value of a formula. For example, to BOLD all values that are above 10.
|
![](http://www.opssys.com/instantkb/Attachments/2e03cba9-563d-492d-98fe-29e9.png)
|
![](http://www.opssys.com/InstantKB/Attachments/16606fe2-e4c2-4dde-a5d0-6de5.png)
FIELDS:
Apply First True Rule Only (Default): Starting with Action 1 when a condition is met, set the cell format to the Action's format and stop. Example: Action 1 set to Italic if the value >10, Action 2 set to Bold if value > 20. Value of 30 would be Italic because 30 is greater than 10 and the first condition was met.
Apply All True Rules: Starting with Action 1 if a condition is met, set the action and move to the next action. Example: Action 1 set to Italic if the value >10, Action 2 set to Bold if value > 20. Value of 30 would be Bold, Italic.
When Value of Cell: Used to set the cell format based on the value in the cell be formatted. Example: When A1 is greater than 10 set A1 to Bold.
Comparison: Select what type of comparison to make. NOTE: when comparing a text cell the comparsion is NOT case-senstive (i.e. Hello is equal to HELLO, heLLo...). When comparing numeric values, we compare the displayed value to the entered limit (i.e. a cell has a formula of =3.14159 but is displayed to 2 decimals so 3.14 is displayed, 3.14 is compared to the limit NOT 3.14159). Cell when comparing values with data qualifiers the entered value rule is used (i.e. <2 is treated as a 2, >1000 as 1000, ND as 0). Cells containing dates are compared as dates. Choose from the following list.
is Equal to
is Not Equal to
is Greater than
is Greater than or Equal to
is Less than
is Less than or Equal to
is Between
is Between (Exclusive)
is Not Between
is Not Between (Exclusive)
Contains - If the character(s) entered in the limit are anywhere in the cell.
Does not contain - If the character(s) entered in the limit are NOT anywhere in the cell.
Is Detected - If the cell starts with "ND" or starts with "<".
Is Not Detected - If the cell does NOT start with "ND" or starts with "<".
Is Empty - If the cell is blank or empty.
Compare To: Constant, Cell Value, or Variable Limit.
- Constant: Enter the value to compare to (i.e. 10, Hello)
- Cell Value: You will be prompted to enter a cell reference to get the value to compare to. The cell reference can be an absolute reference ($B$2), or a relative reference (B2).
- Variable Limit: You will be prompted to choose the variable and it's limit (i.e. Daily Max Limit, QC UCL, Entry Min Limit...). Use the Limit Offset to specify the date to get the limit for. For Example, if you are showing three months of daily values (each month is column) and your limit changes every month, for column 2 (2nd month of the report) you would set the offset to 2.
When Value of a different cell: Used to set the cell format based on the value of a different cell. Example: When A1 is greater than 10 set B1 to Bold.
Has the same options as When Value of cell. See above.
When Data Approval Level: Used to set the cell format based on a variables data approval level.
for Variable: Select Variable used for condition
Grouped By: Used with offset, sets which data slot or data range to get the approval level to compare to the Approval Level Specified. The minimum approval level is calculated for the grouping. Example, a grouping of Monthly for a daily variable with an offset of 1 would calculate the minimum data approval of the 31 daily values and compare that minimum to the value specified in the Approval Level. If a grouping of Daily is used with a Daily variable with an offset of 7 the data approval for the variable of the 7th day of the report would be compared to the specified Approval Level.
Offset: Sets the number of ‘intervals' from the start date of the report. Increment by 1, for example, increases the offset by one for the grouping in the Grouped By Field.
is: Select Operator Use operator to specify which data is to be used for the condition
Approval Level: Sets the approval level to use to calculate condition on report.
See Examples 6 and 7.
Set Cell Format To:
Set Foreground Color to: Displays selected color of cell foreground if condition is met
Set Background Color to: Displays selected color of cell background if condition is met
Set Bold: Bolds data in cell if condition is met
Set Italic: Italicizes data in cell if condition is met
Hide Row: Hides the entire row if condition is met.
Cell Will Display Like: Shows what cell will display if condition is met
BUTTONS:
![](http://www.opssys.com/instantkb/Attachments/479a4e05-88f7-4d53-a691-c3c0.png) |
Applies changes and closes form |
![](http://www.opssys.com/instantkb/Attachments/bf9aa1ae-1a6c-4b0d-a513-b6d8.png) |
Closes form |
![](http://www.opssys.com/instantkb/Attachments/ab165fc8-a86a-4f65-ac12-1491.png) |
Creates a new condition. Conditions are tested in order and once a condition is met the cell if formatted and no other conditions are processed. For example, if you want the cell to be yellow if it is greater than 10, and red if greater than 20 the first action (tab) should check for greater than 20, second tab should check for greater than 10. |
![](http://www.opssys.com/instantkb/Attachments/dbff00fa-e227-4343-960b-ef55.png) |
Deletes the current Action for the conditional formatting. |
![](http://www.opssys.com/instantkb/Attachments/ea0b720d-d2c7-4057-a44a-cb4a.png) |
Removes all condtional formatting from the cells. |
EXAMPLES:
EXAMPLE 1. Set all Influent Flows that are greater than the Entry Max Limit to Bold, green on lite yellow:
1. Locate Influent Flow in spread design using Locate, Daily Values. Placing date beside data and default heading info.
2. Select cell range to format then use Format, Conditional Formatting to set condition for data (Entry Max = 4 in this example)
![](http://www.opssys.com/InstantKB/Attachments/c7e5c6f8-93cd-4d81-b6bc-7ade.png)
Data that meets condition (Data greater than Entry Limit of 4 for Influent Flow) will now be displayed as follows:
![](http://www.opssys.com/InstantKB/Attachments/91e3b1c4-a8f8-4b33-abd0-e895.png)
Example 2: Set all Influent Flows that is greater than the Influent Flow Monthly Average Limit to Bold, yellow on red:
1. Highlight cell range and set limit to CELL($D$5). The CELL(XX) command allows you to compare the current cell to a value in a different cell. Use the $ to refer to the cell with absolute referencing, i.e. CELL($D$5) will refer to cell D5 for the entire cell range. CELL(C3) will refer to cell C3, then C4, etc...
![](http://www.opssys.com/InstantKB/Attachments/d59edf84-f040-447e-87ba-7530.png)
![](http://www.opssys.com/InstantKB/Attachments/5bd36c35-325e-4159-a521-05a2.png)
Example 3: Using IS BETWEEN
When using Is Between, Is not Between, etc... you specify the range with a dash between the values:
![](http://www.opssys.com/InstantKB/Attachments/0bb44303-f5d4-4e91-ab7a-c146.png)
If referring to Cells use Cell(B2)-Cell(B3). Is Between is Inclusive meaning that a value of 3 is considered to be between 3 and 6. Examples
![](http://www.opssys.com/InstantKB/Attachments/28fb5194-4adc-4fe8-99b0-48c4.png)
NOTE: If you would like to input negative numbers they will need to be in (). EX: (10)-10 is Negative 10 through 10. The smaller number must be first. EX: (20)-(10) Negative 20 through Negative 10.
Example 4: Setting format based on a different cells value.
Set a cell to yellow if the data has been edited. We use the VDE function in column D to see if the data is edited. To format column C, we choose When Value of a different cell and set the cell to D6. Note the first cell we are formatting is C6, and since we didn't use absolute references (i.e. $D$6) we will compare look at D6 to format C6, look at D7 to format C7, etc... The VDE function returns a 1 (meaning the data has been edited) so we say when D6 equals 1 set the format. ![](http://www.opssys.com/InstantKB/Attachments/06decf37-bc16-4c09-a985-964d.png)
![](http://www.opssys.com/InstantKB/Attachments/af383ed1-1147-4a04-8657-8d18.png)
Example 5: Only show days with Flows greater than 3 using Hide Row:
![](http://www.opssys.com/InstantKB/Attachments/8c9d9201-e8b7-4301-a463-c0f2.png)
![](http://www.opssys.com/InstantKB/Attachments/e639d3ea-d068-470e-a37c-8677.png)
Example 6: Set background to yellow for Influent BOD unapproved data
Since Influent BOD is a daily variable and I want to compare each day's data approval level I use a grouping of Days with an Offset of Increment By 1. This means the first cell in the block (C6) will find the data approval level for the 1st day of the report and check if it is not equal to FINAL APPROVAL. Cell C7 will find the data approval level will use an offset of 2 and find the data approval level for the 2nd day of the report.
![](http://www.opssys.com/InstantKB/Attachments/905a68a8-47c8-40d1-acde-5eda.png)
Example 7: Set background to yellow for any month that has an unapproved Influent BOD
Group by Months. For cell C5, the minimum Data Approval level for Influent BOD for June 2020 (1st month of the report) will be calculated and if it is not equal to FINAL APPROVAL the cell will be set to yellow. For cell C6, the minimum Data Approval Level for July 2020 (2nd month of report) will be compared.
![](http://www.opssys.com/InstantKB/Attachments/11aa8063-51d2-4ef1-a96f-4f6f.png)
Example 8: Set background to red for all dates greater that 12/15/2020
NOTE: If a cell contains a date, time, or a date/time it is compared as a datetime not as a string.
![](http://www.opssys.com/InstantKB/Attachments/7928e60a-37b5-449b-bcfc-7f42.png)
NOTES:
The following tables explain how comparisons are performed.
Cell Value |
Limit |
Is Greater (>) |
Is Equal (=) |
Is Less Than (<) |
Contains |
3.14159 (shown to 2 decimals) |
3.14 |
False |
True |
False |
False |
Apple |
B |
False |
False |
True |
False |
Apple |
APPLE |
False |
True |
False |
True |
Cell Value |
Limit |
Is Greater (>) |
Is Equal (=) |
Is Less Than (<) |
<2 (will be treated as 2) |
2 |
False |
True |
False |
>100 (will be treated as 100) |
100 |
False |
True |
False |
ND (will be treated as 0) |
2 |
False |
False |
True |
Cell Value |
Is Detected |
Is Not Detected |
Is Empty |
45 |
True |
False |
False |
<2 |
False |
True |
False |
0 |
True |
False |
False |
>100 |
True |
False |
False |
"" - Blank cell |
False |
False |
True |
ND |
False |
True |
False |