Excel – Conditional Formatting Based on Several Columns

conditional formattingmicrosoft excel

I have a table of 3 columns as follows:

People    test1    test2
A         90       80
B         70       60
C         50       40
D         30       50

I want to apply a conditional formatting rule on the table: given a person, if his score of test2 is higher than the score of test1, then we make the background colour of his name red.

Does anyone know if we could do this in Excel? It seems to me that the conditional formatting always applies to one cell based on its own value.

Best Answer

  1. In Excel 2016 click the first cell you want to format, e.g. A2.
  2. Click New Rule...
  3. Click Use a format to determine which cells to format
  4. In the field, Format values where this formula is true, input =C2>B2
  5. Select A2 (first field with name) and click the Format Painter button (Home Ribbon > Clipboard > Paint Brush)
  6. Click or Click and drag over the fields you want to use the same formula.
Related Question