How to flag cash flow problems with conditional formatting in Google Sheets

Quick answer

Select your table, for example A2:E9, and open Format > Conditional formatting. Under Format cells if, choose Custom formula is and enter =$D2<0, where column D is net cash flow. Pick a red fill and every month that lost money turns red. Add more rules the same way to flag spending spikes, like =$C2>AVERAGE($C$2:$C)*1.25.

Why color instead of an IF column

A common way to check cash flow is a helper column like =IF(D2<0,"Loss",""). It works, but you still have to read down a column of words to find the bad months. Conditional formatting colors the numbers themselves, so a problem month stands out the moment you open the sheet, and nothing extra sits in your table.

Every rule below is a custom formula: a test that comes out TRUE or FALSE for each row, the same kind of test you’d put inside an IF. When it’s TRUE, Sheets colors the cell.

The example data

Eight months of cash for a small business that started with 5000 in the bank. Net is cash in minus cash out, and Balance is what’s left after each month.

ABCDE
1MonthCash inCash outNetBalance
2Jan8200710011006100
3Feb790074005006600
4Mar81009800-17004900
5Apr8400730011006000
6May760075001006100
7Jun800012400-44001700
8Jul830076007002400
9Aug77008200-5001900
Monthly cash flow. Three months lost money, and June’s spending was far above the rest.

Highlight months that lose money

  1. Select the whole table without the headers, A2:E9. Use A2:E to cover months you add later.
  2. Open Format > Conditional formatting. The rules panel opens on the right.
  3. Under Format cells if, choose Custom formula is.
  4. Enter =$D2<0.
  5. Under Formatting style, pick a light red fill and click Done.
ABCDE
1MonthCash inCash outNetBalance
2Jan8200710011006100
3Feb790074005006600
4Mar81009800-17004900
5Apr8400730011006000
6May760075001006100
7Jun800012400-44001700
8Jul830076007002400
9Aug77008200-5001900
March, June and August spent more than they took in.

The $ before D makes every cell in a row look at that row’s net, so the whole month turns red, not just the one number. 2 has no $, so the rule moves down a row at a time: row 3 checks D3, row 4 checks D4, and so on. The highlight duplicates guide walks through these dollar signs in more detail.

No Net column? Do the subtraction inside the rule: =$B2-$C2<0.

Flag months where spending jumps above average

A loss can come from a slow month for sales or from one big bill. To spot the big bills, compare each month’s spending with the average. Select C2:C9 and use:

=$C2>AVERAGE($C$2:$C)*1.25

Average spending is 8412.5, so anything above about 10516 is colored: June’s 12400.

ABCDE
1MonthCash inCash outNetBalance
2Jan8200710011006100
3Feb790074005006600
4Mar81009800-17004900
5Apr8400730011006000
6May760075001006100
7Jun800012400-44001700
8Jul830076007002400
9Aug77008200-5001900
Only June is more than 25% above the average month.

Change 1.25 to set how big a jump counts: 1.1 flags anything 10% over, 1.5 only the extreme months. The AVERAGE range is locked with $ signs so every month is measured against the same number, and it skips empty rows, so leaving it open to $C is safe.

Flag a jump from the month before

One huge month raises the average and can hide a smaller spike. Comparing each month with the one before catches those. Select C3:C9, starting on the second month, and use:

=$C3>$C2*1.2

Colors any month that spent 20% more than the month before: March (9800 after 7400) and June (12400 after 7500).

ABCDE
1MonthCash inCash outNetBalance
2Jan8200710011006100
3Feb790074005006600
4Mar81009800-17004900
5Apr8400730011006000
6May760075001006100
7Jun800012400-44001700
8Jul830076007002400
9Aug77008200-5001900
March didn’t stand out against the average, but it was a 32% jump from February.

The range starts at C3, so the formula starts at C3 too. If the rule’s first cell and the formula don’t match, the colors land a row off.

Catch real outliers with standard deviation

A fixed percentage treats every business the same. Standard deviation measures how much your months usually move, and flags only the ones that move a lot more than that:

=ABS($C2-AVERAGE($C$2:$C))>STDEV($C$2:$C)

Spending usually sits within about 1826 of the average. Only June is further out than that.

Use >2*STDEV(...) for a stricter test once you have a year or more of months. With only a few months, the percentage rules above are easier to reason about.

Warn when the balance runs low

The month to worry about isn’t always the one that lost money. It’s the one that leaves too little in the bank. Select E2:E9 and use:

=$E2<2500

Colors June, July and August: the June loss left only 1700, and the balance never recovered above 2500.

ABCDE
1MonthCash inCash outNetBalance
2Jan8200710011006100
3Feb790074005006600
4Mar81009800-17004900
5Apr8400730011006000
6May760075001006100
7Jun800012400-44001700
8Jul830076007002400
9Aug77008200-5001900
Three months under the 2500 cushion, even though July made money.

Put the cushion in its own cell, like H1, and use =$E2<$H$1. Then you can change the number without opening the rule.

If you apply this rule to an open range like E2:E, empty rows count as 0 and turn red too. Skip them with =AND($E2<>"",$E2<2500). The standard deviation rule needs the same check.

See the whole picture with a color scale

For the Net column, a color scale shades every month instead of just the problem ones. Select D2:D9, open Format > Conditional formatting, and switch to the Color scale tab. Set the Minpoint to red, the Midpoint to Number 0 in white, and the Maxpoint to green. Losses go red, good months go green, and the darkest colors show the extremes.

Using several rules together

  • Order matters: when two rules color the same cell, the one higher in the list wins. Put your most urgent warning, like the low balance, at the top. Drag a rule to reorder it.
  • Count the red months: =COUNTIF(D2:D9,"<0") returns 3, a quick number to put at the top of the sheet. See COUNTIF.
  • Edit or remove a rule: click any colored cell, open Format > Conditional formatting, and click the rule, or point at it and click the trash icon. Your numbers never change.

Frequently asked questions

How do I highlight negative numbers in Google Sheets?

Select the cells, open Format > Conditional formatting, and under Format cells if choose Less than with the value 0. To color the whole row when one column is negative, choose Custom formula is and enter =$D2<0, with D as that column.

Why is my conditional formatting one row off?

The formula has to refer to the first row of the range you selected. If the rule applies to A2:E9, the formula should check row 2, as in =$D2<0. If it applies to A1:E9, use =$D1<0.

Can a conditional formatting rule use AVERAGE or other functions?

Yes. Any formula that comes out TRUE or FALSE works, for example =$C2>AVERAGE($C$2:$C)*1.25 to color spending more than 25% above the average month.

Is conditional formatting better than an IF column?

For spotting problems, usually. The color sits on the numbers themselves and adds nothing to your table. An IF column is still useful when you need the label in a formula, a filter or a pivot table.

Can I use a cell value as the threshold?

Yes. Lock the cell with dollar signs, for example =$E2<$H$1, so every row compares against H1. Change H1 and the colors update right away.

Lessons for the formulas in this guide

Become a spreadsheet expert

Hands-on lessons and drills on a real practice sheet take you from beginner to expert. The first 18 lessons are free, and Pro unlocks the rest for a one-time $49.99.