How to Highlight the Value That Exceeds a Target with Excel Conditional Formatting
Question details
The user needs to highlight the exact cell in a running total that pushes the cumulative sum over a defined target limit.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Tracking cumulative numerical data and needing a visual indicator for the precise moment a running total breaches a specific target value.
- Observed behavior
- Standard conditional formatting rules successfully highlight values while the running total is below the target, but fail to isolate and highlight the first specific value that pushes the total over the target.
Ensure your data is organized in a continuous single column or row without blank cells interrupting the sequence, and designate a specific cell (such as E1) to hold your static target value.
Use a Custom Formula to Track Running Totals in Conditional Formatting
Apply a combination of SUM and AND functions inside a custom conditional formatting rule to detect exactly when the cumulative total exceeds your target.
To accurately highlight the breaking point in a running total, you must use relative and absolute cell references. We will create two rules: one for the very first cell to check if it immediately exceeds the target, and another for the rest of the column to evaluate the running total step-by-step.
Enter your desired target value into a designated cell, for example, cell E1.
Select the first cell in your data range (e.g., A1). Go to Home > Conditional Formatting > New Rule. Choose 'Use a formula to determine which cells to format'. Enter the formula: =AND(SUM($A$1:$A1)>=$E$1, ISNUMBER($A1)). Click Format to set your highlight color, then click OK.
Select the rest of your data column (e.g., from A2 down to your last row). Go to Home > Conditional Formatting > New Rule, and select the formula option again.
Enter the formula: =AND(SUM($A$1:$A1)<=$E$1, SUM($A$1:$A2)>$E$1, ISNUMBER($A2)). This checks if the previous sum was below the target but the current sum exceeds it.
Click Format, pick the same highlight color you used in step 2, and click OK to apply the rule to the rest of the column.

Apply Complex Conditional Formatting Easily in WPS Spreadsheet
WPS Spreadsheet features a robust and intuitive conditional formatting engine that makes it incredibly simple to track running totals and visualize data breaches, using the exact same formulas you would use in Microsoft Excel.
- 1. Open your dataset: Launch WPS Spreadsheet and open the workbook containing your running total data.
- 2. Navigate to Conditional Formatting: Highlight your data range, then go to the 'Home' tab and click on 'Conditional Formatting' followed by 'New Rule'.
- 3. Input the custom formula: Select 'Use a formula to determine which cells to format' and paste your AND/SUM formula to track the target.
- 4. Set highlighting style: Click the 'Format' button, choose an eye-catching fill color, and click 'OK' to instantly visualize the target breach.

Frequently Asked Questions
Why is my conditional formatting rule highlighting the wrong cell?
This usually happens due to incorrect absolute and relative cell references in your formula. Ensure the starting cell of your SUM range is absolute (e.g., $A$1) while the end cell is relative (e.g., A2). This allows the range to expand dynamically as it evaluates each row down the column.
Can I highlight the entire row instead of just the specific cell?
Yes. To highlight the entire row, select your entire data range across all columns before applying the new rule. In your formula, lock the column reference for your data but leave the row relative (e.g., use $A1 instead of A1 or $A$1).
What if my target value needs to change frequently?
By referencing a specific cell for your target (like $E$1) rather than hardcoding a static number into the conditional formatting formula, your highlighting will automatically update in real-time whenever you change the numerical value in cell E1.




