Highlight Values Until a Running Total Reaches a Limit in Excel
Question details
Highlight currency values based on whether their running total has reached a specified limit.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants conditional formatting to respond when amounts change or rows are added to a currency column.
- Observed behavior
- Values are highlighted according to their cumulative total and the chosen threshold.
Identify the amount range and threshold. The example uses D2:D150 and a limit of 80,000; D1 should be a text header or blank.
Highlight through the row that reaches the limit
Use this rule when the row that first reaches or exceeds the limit should also be highlighted.
The formula checks the total before the current row, so it includes the row that brings the total to or above 80,000. It assumes amounts are nonnegative; negative values can cause highlighting to resume if the total falls below the limit.
Select D2:D150, making sure D2 is the active cell in the selection.
Go to Home > Conditional Formatting > New Rule, then select Use a formula to determine which cells to format.
Enter =SUM(D$1:D1)<80000. Replace 80000 with your limit.
Click Format, choose a color on the Fill tab, and click OK twice.
Open Home > Conditional Formatting > Manage Rules and check the Applies to range. Extend it when adding rows outside D2:D150, or use an Excel Table and verify that the rule extends to new rows.

Highlight only rows with a total below the limit
Use this rule to exclude the row that reaches or exceeds the threshold.
Highlight a running-total limit in WPS Spreadsheet
Use a formula-based conditional formatting rule in WPS Spreadsheet to highlight amounts through the row that reaches your limit.
- 1. Open the workbook: Open your Excel workbook in WPS Spreadsheet and select D2:D150 with D2 as the active cell.
- 2. Add a rule: On the Home tab, open Conditional Formatting and choose New Rule, then select the formula-based rule option.
- 3. Enter the formula: Enter =AND(ISNUMBER(D2),SUM(D$1:D1)<80000), adjusting the column and limit to match your sheet.
- 4. Apply a fill: Choose a fill color in the formatting options and confirm the rule. Check its applied range when adding rows.

Frequently Asked Questions
Does the formula highlight the row that exceeds the limit?
Yes. =SUM(D$1:D1)<80000 checks the total before the current row, so the row that first reaches or exceeds 80,000 is highlighted.
How can I exclude the row that reaches the limit?
Create a formula-based rule for D2:D150 using =AND(ISNUMBER(D2),SUM($D$2:D2)<80000). Use <= instead of < if an exact total of 80,000 should remain highlighted.
Will the formatting apply to new rows?
Rows added within the applied range are covered. For rows outside it, open Home > Conditional Formatting > Manage Rules and extend the Applies to range. If you use an Excel Table, verify that the rule extends to new rows.
Why are blank cells highlighted?
The previous-total formula can be true for blank cells. Add a numeric check with =AND(ISNUMBER(D2),SUM(D$1:D1)<80000) to highlight only cells containing numbers.




