Highlight the cell if greater than value in the next column

2

So I tried experimenting with conditional formatting, but unable to find a way to highlight the cells in the column if their value is greater than the one in the next column under the same row.

For example:

102 | 110 (highlight right cell)
130 | 120 (highlight left cell)
122 | 133 (highlight right cell)

How would I go about doing this?

btrballin

Posted 2017-07-05T03:50:28.123

Reputation: 175

What product are you using? Don't tag with both Excel and Google sheets. There are differences, and what applies to one will not apply to the other. – teylyn – 2017-07-05T05:50:04.447

Answers

2

Here are the steps for Excel. Assuming the first value is in A1,

  • select A1 to B3
  • click Conditional Formatting > New Rule
  • click Use a formula to determine
  • enter this formula into the formula box and take care with the dollar signs

    =A1=MAX($A1:$B1)

  • Click the Format button and set the desired format.

  • confirm all dialogs.

enter image description here

In Google sheets, select the cells, create a conditional format with "Custom formula is" and apply the same formula.

enter image description here

teylyn

Posted 2017-07-05T03:50:28.123

Reputation: 19 551

Thanks. I did something similar. Instead I used a custom formula where I did =A1 < B1 instead of using MAX. The targeted cells were the values in 1 column. I had to repeat the same thing for the other column. – btrballin – 2017-07-05T17:58:41.080

0

Sorry, didn't see the Excel tag, only the Google Spreadsheets. This example is for Google Sheets. The concept is identical, but the wording may be different for Excel.

Use conditional formatting.

  • In the left column, select your range (eg A1:A3) then under Format select Conditional Formatting.
  • Select the Formatting Style greater than
  • In the "Value or formula" field enter `=B1'

Repeat for column B, referencing cell A1. enter image description here

Ian

Posted 2017-07-05T03:50:28.123

Reputation: 822

No need for two different rules. See my answer for how to do this with one rule. – teylyn – 2017-07-05T06:02:09.860

Thanks for the answer. I am actually using Google Sheets, but Excel and Sheets are so similar that I just added both as tags to increase the overall reach of my question – btrballin – 2017-07-05T18:25:39.130