logo
search
Formatting Issues

How to Use Conditional Formatting Formulas for Excel Color Ranges

Aamir Naveed AkramAamir Naveed Akram Sep 28, 2026 868 views

Question details

Set up conditional formatting rules to automatically color-code cells based on multiple numerical thresholds, such as highlighting calorie totals in white, pink, yellow, and red.

WPS Spreadsheet Manage Conditional Formatting Rules
Product
Excel
Device & OS
not provided
Scenario
Applying color highlights to a dataset where values fall into distinct numerical ranges, allowing for quick visual analysis of data totals.
Observed behavior
Cells dynamically change background color to match assigned thresholds (e.g., greater than 2500 turns red) when the correct conditional formatting rules and hierarchies are applied.
Before you start

Ensure your data is organized in a clear column or row, and clearly define your numerical thresholds (e.g., minimum and maximum limits for each color category) before creating the rules.

Solution 1Recommended

Use 'Format only cells that contain' for Static Thresholds

Use this straightforward method if your threshold values (such as 1900, 2300, and 2500) are fixed and do not need to change based on other variables.

When dealing with multiple thresholds, the order of your conditional formatting rules is critical. Excel processes these rules from top to bottom. You must prioritize the highest values (or most restrictive conditions) at the top of the list to prevent overlapping rules from overriding each other.

1
Select the target cells

Highlight the cells containing the numerical totals you want to format.

2
Create a new rule

Navigate to the Home tab, click on Conditional Formatting, and select New Rule. Choose 'Format only cells that contain' from the rule types.

3
Set the highest threshold

Set the rule description to 'Cell Value' 'greater than' and enter 2500. Click the Format button, select the Fill tab, choose a Red background color, and click OK.

4
Add remaining thresholds

Repeat the process to create new rules for the other thresholds: 'greater than 2300' (assign a Yellow fill) and 'greater than or equal to 1900' (assign a Pink fill).

5
Manage rule order

Go to Conditional Formatting > Manage Rules. Use the Up and Down arrows to arrange the rules so the condition for > 2500 is at the top, followed by > 2300, and then >= 1900.

WPS Spreadsheet Manage Conditional Formatting Rules
Rule Hierarchy: By placing the highest threshold at the top of the Manage Rules dialog, Excel correctly evaluates a value like 2600 as Red before it even checks the Yellow or Pink rules.
Easy Spreadsheet Formatting

Color-Code Your Data Easily with WPS Spreadsheet

WPS Spreadsheet provides intuitive and robust conditional formatting tools that help you instantly visualize data trends. Apply custom formulas, color scales, and threshold rules effortlessly.

  1. 1. Open your file in WPS: Launch WPS Spreadsheet and open your existing dataset or create a new one.
  2. 2. Select your data: Highlight the range of cells where you want to apply color-coded thresholds.
  3. 3. Access conditional formatting: Navigate to the Home tab and click on Conditional Formatting.
  4. 4. Define your rules: Select 'Highlight Cells Rules' for quick threshold setups or 'New Rule' to input custom formulas and color fills.
  5. 5. Prioritize and apply: Use the Manage Rules option to ensure your most restrictive thresholds are at the top, then click OK to apply.
Free and lightweight spreadsheet softwareFully compatible with Microsoft Excel conditional formatting rules and .xlsx filesUser-friendly interface for managing complex rule hierarchiesBuilt-in support for advanced lookup functions like XLOOKUP
microsoft office alternative - wps office

Frequently Asked Questions

Why are my conditional formatting rules overlapping incorrectly?

Conditional formatting rules are processed in the order they appear. If a broader rule (like > 1900) is placed above a stricter rule (like > 2500), a value of 2600 will trigger the first rule it hits and ignore the rest. To fix this, open 'Manage Rules' and use the arrows to place the strictest conditions at the top of the list.

Can I apply conditional formatting to an entire row based on one cell's value?

Yes. Select the entire range of data you want to format, go to Conditional Formatting > New Rule > 'Use a formula to determine which cells to format'. Enter a formula that locks the column reference but leaves the row relative (e.g., =$C2>2500), then apply your desired color format.

How do I clear conditional formatting rules from my cells?

Select the cells containing the rules you want to remove. Go to the Home tab, click Conditional Formatting, choose 'Clear Rules', and then select either 'Clear Rules from Selected Cells' or 'Clear Rules from Entire Sheet'.

Does conditional formatting slow down my spreadsheet?

Applying basic conditional formatting to small datasets will not affect performance. However, using highly complex formula-based rules (like volatile functions or extensive lookups) across tens of thousands of rows can slow down spreadsheet calculation times. Limit ranges to only the data you need to format.