Color with IF function

Hello,

How to set the color or pattern of a cell using the IF function?

=IF(A1>2, red, blue)

2 answers

  • Votes
  • Date
  • Descending date
  1. Can you give me more details? I can't do it.
    1. Contributor
      If you told us which version you are using, we could give you the procedure that is different between 2003 and 2007/2010.
    2. I have version 2003.
    3. Contributor
      Good evening,

      You select the cell to color:
      - format tab
      - select "conditional formatting"
      - condition 1 choose "the formula is"
      - next to it enter =A1>2
      - click on "format" and choose then validate "ok"