Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a spreadsheet with approximately 2000 rows. I want to color code the rows based on the following conditions:

If T2 is less than U2, color the row red; if T2 is greater than U2, color the row green; and if U2 is empty, color the row blue.

Please tell me how to write it. Thanks

share|improve this question

In Excel 2003:

  • Select T2
  • Format -> Conditional Formatting...
  • Add the first condition to set background to red, with condition less than, and value =U2
  • Click "Add > >" twice to add two more conditions, one for the greater-than case, and one for the empty case (condition equal to, value ="")

Click OK.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.