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.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Cash in | Cash out | Net | Balance |
| 2 | Jan | 8200 | 7100 | 1100 | 6100 |
| 3 | Feb | 7900 | 7400 | 500 | 6600 |
| 4 | Mar | 8100 | 9800 | -1700 | 4900 |
| 5 | Apr | 8400 | 7300 | 1100 | 6000 |
| 6 | May | 7600 | 7500 | 100 | 6100 |
| 7 | Jun | 8000 | 12400 | -4400 | 1700 |
| 8 | Jul | 8300 | 7600 | 700 | 2400 |
| 9 | Aug | 7700 | 8200 | -500 | 1900 |
Highlight months that lose money
- Select the whole table without the headers,
A2:E9. UseA2:Eto cover months you add later. - Open Format > Conditional formatting. The rules panel opens on the right.
- Under Format cells if, choose Custom formula is.
- Enter
=$D2<0. - Under Formatting style, pick a light red fill and click Done.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Cash in | Cash out | Net | Balance |
| 2 | Jan | 8200 | 7100 | 1100 | 6100 |
| 3 | Feb | 7900 | 7400 | 500 | 6600 |
| 4 | Mar | 8100 | 9800 | -1700 | 4900 |
| 5 | Apr | 8400 | 7300 | 1100 | 6000 |
| 6 | May | 7600 | 7500 | 100 | 6100 |
| 7 | Jun | 8000 | 12400 | -4400 | 1700 |
| 8 | Jul | 8300 | 7600 | 700 | 2400 |
| 9 | Aug | 7700 | 8200 | -500 | 1900 |
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.25Average spending is 8412.5, so anything above about 10516 is colored: June’s 12400.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Cash in | Cash out | Net | Balance |
| 2 | Jan | 8200 | 7100 | 1100 | 6100 |
| 3 | Feb | 7900 | 7400 | 500 | 6600 |
| 4 | Mar | 8100 | 9800 | -1700 | 4900 |
| 5 | Apr | 8400 | 7300 | 1100 | 6000 |
| 6 | May | 7600 | 7500 | 100 | 6100 |
| 7 | Jun | 8000 | 12400 | -4400 | 1700 |
| 8 | Jul | 8300 | 7600 | 700 | 2400 |
| 9 | Aug | 7700 | 8200 | -500 | 1900 |
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.2Colors any month that spent 20% more than the month before: March (9800 after 7400) and June (12400 after 7500).
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Cash in | Cash out | Net | Balance |
| 2 | Jan | 8200 | 7100 | 1100 | 6100 |
| 3 | Feb | 7900 | 7400 | 500 | 6600 |
| 4 | Mar | 8100 | 9800 | -1700 | 4900 |
| 5 | Apr | 8400 | 7300 | 1100 | 6000 |
| 6 | May | 7600 | 7500 | 100 | 6100 |
| 7 | Jun | 8000 | 12400 | -4400 | 1700 |
| 8 | Jul | 8300 | 7600 | 700 | 2400 |
| 9 | Aug | 7700 | 8200 | -500 | 1900 |
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<2500Colors June, July and August: the June loss left only 1700, and the balance never recovered above 2500.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Cash in | Cash out | Net | Balance |
| 2 | Jan | 8200 | 7100 | 1100 | 6100 |
| 3 | Feb | 7900 | 7400 | 500 | 6600 |
| 4 | Mar | 8100 | 9800 | -1700 | 4900 |
| 5 | Apr | 8400 | 7300 | 1100 | 6000 |
| 6 | May | 7600 | 7500 | 100 | 6100 |
| 7 | Jun | 8000 | 12400 | -4400 | 1700 |
| 8 | Jul | 8300 | 7600 | 700 | 2400 |
| 9 | Aug | 7700 | 8200 | -500 | 1900 |
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.