Formatting Issues

How to Apply Conditional Formatting Based on a Running Total in Excel

Bushra ParveenBushra Parveen Oct 21, 2026 871 views

Question details

The user needs to format a row of cells automatically (e.g., coloring them green, yellow, or red) based on whether their cumulative running total meets certain target thresholds.

How to Apply Conditional Formatting Based on a Running Total in Excel
Product
Excel
Device & OS
not provided
Scenario
Tracking continuous data such as daily schedules or monthly inventory, where cells need dynamic color-coding as the cumulative sum changes over time and reaches a specific target.
Observed behavior
Cells dynamically change color based on predefined percentage thresholds as the running total updates relative to a fixed target cell.
Before you start

Ensure your dataset is arranged with a continuous row or column of numerical values to calculate the running total, and designate a specific cell for your target threshold.

Solution 1Recommended

Use Formula-Based Conditional Formatting Rules

Apply custom formulas with mixed cell references to calculate a running total dynamically and trigger specific formatting across the row.

By using mixed cell references in your formatting formula, the calculation expands automatically as it moves across the row. You can set up multiple rules to apply different colors, such as green, yellow, and red, depending on how close the cumulative total is to your target value.

1
Select the target data range

Highlight the entire range of cells you want to format. For example, click and drag to select cells M9 through AK9.

2
Create a new formatting rule

Navigate to the Home tab on the ribbon. Click on 'Conditional Formatting' and select 'New Rule' from the dropdown menu.

3
Enter the running total formula

Choose the option 'Use a formula to determine which cells to format'. Enter a formula that calculates the cumulative sum and compares it to your target, such as =SUM($M9:M9)>=$E9.

4
Define the cell format

Click the 'Format' button, go to the 'Fill' tab, and select your desired color (e.g., Green). Click OK to apply the primary rule.

5
Add rules for percentage thresholds

Repeat the process to add additional rules for different colors (like yellow or red). Multiply your target by a percentage threshold in the formula, for example, =SUM($M9:M9)>=($E9*0.6).

Use Formula-Based Conditional Formatting Rules
Manage Rule Hierarchy: When applying multiple color conditions, use the 'Manage Rules' option under Conditional Formatting to arrange them correctly. The rules at the top of the list take priority, so ensure your thresholds are ordered logically.
Professional Spreadsheet Tool

Manage Running Totals Easily with WPS Spreadsheet

WPS Spreadsheet provides powerful and intuitive conditional formatting tools. You can easily apply formula-based rules to track cumulative totals just as you would in Microsoft Excel.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open your workbook containing the inventory or schedule data.
  2. 2. Access Conditional Formatting: Select your data row, go to the Home tab, and click on the 'Conditional Formatting' icon.
  3. 3. Apply formula rules: Select 'New Rule', choose the formula option, and input your running total calculation using mixed references.
  4. 4. Customize and save: Set your preferred fill colors for the thresholds and click OK to dynamically highlight your data.
Free and lightweight office suiteFully compatible with Microsoft Excel conditional formatting rules and formulasUser-friendly Rules Manager for handling multiple color thresholdsCross-platform support for seamless data tracking anywhere
microsoft office alternative - wps office

Frequently Asked Questions

Why is my conditional formatting applying to the wrong cells?

This is typically caused by incorrect relative or absolute cell references. Ensure the start of your sum range uses an absolute column reference (e.g., $M9) while the end uses a relative reference (e.g., M9) so the range expands properly across the row.

Will the colors update automatically if I change the target inventory value?

Yes. Because the conditional formatting rule references the target cell (like $E9) instead of a hardcoded number, the cell colors will instantly recalculate and update whenever you modify the target value or add new daily data.

How do I prevent multiple formatting rules from conflicting?

Open the Conditional Formatting Rules Manager to view all active rules for your selection. Arrange them in the correct priority order using the up and down arrows. You can also check the 'Stop If True' box on a rule to prevent lower-priority formats from applying once a higher condition is met.