IF function changes font color

Peter Lebensold 20 Reputation points
2026-11-19T20:25:22.8233333+00:00

I want positive amounts to be in green and negative amounts to be in red

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

Answer accepted by question author
Rory Archibald 19,235 Reputation points Volunteer Moderator
2026-11-19T21:03:27.32+00:00

You can also achieve that with a simple custom number format. The first section in a number format is for positive numbers, the second for negative, the third for zero and the fourth for text. So a custom format like:

[Green]0;[Red]-0;0

will produce green positive numbers, red negative ones and the default colour for zero. You can apply whatever number formatting you want within that.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

Answer accepted by question author

AI answer

2026-11-19T20:25:48.3766667+00:00

An IF formula cannot change font color; select the amount cells and create two Conditional Formatting rules—green for values greater than zero and red for values less than zero.^1^

Create the rules in Excel for Windows

  1. Select the cells containing the amounts.
  2. Go to Home → Conditional Formatting → New Rule.
  3. Select Format only cells that contain.
  4. Under Format only cells with, set:
    • Cell Value
    • greater than
    • Enter 0
  5. Click Format → Font, choose Green, and click OK twice.
  6. Repeat Home → Conditional Formatting → New Rule.
  7. Select Format only cells that contain, then set:
    • Cell Value
    • less than
    • Enter 0
  8. Click Format → Font, choose Red, and click OK twice.

Excel will now display positive amounts in green and negative amounts in red. Zero values retain their existing font color because neither rule applies. Microsoft documents the same Home → Conditional Formatting → New Rule → Format only cells that contain procedure for value-based formatting.^2^

If necessary, review or extend the selected range through Home → Conditional Formatting → Manage Rules, using the Applies to field.^3^


References

  1. how to fix a formula - Microsoft Q&A
  2. Format negative percentages to make them easy to find | Microsoft Support
  3. [Windows](https://support.microsoft.com/excel/use-conditional-formatting-to-highlight-information-in-excel#use-a-formula-to-determine-which-cells-to-format)
AI-generated content may be incorrect. Read our transparency notes for more information.

Was this answer helpful?

2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.