conditional formatting

mattbird

Active Member
Joined
Oct 15, 2013
Messages
305
Office Version
  1. 2016
Hi,

I am using Excel 2010. I am trying to get conditional formatting to colour a cell red if there is 2 or more or 2 less between two cells.

ie L leg cell Z6 and R leg cell AB6:

if L=3 and R=4 Both cells Z6 and AB6 stay clear.
if L=2 and R=4 both cells Z6 and AB6 should turn red.
if L=1 and R=5 both cells Z6 and AB6 should turn red etc

or visa versa

L=3 and R=2 both cells stay clear
L=4 and R=1 both cells turn red

Any help would be great, thanks
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Select both Z6 and AB6 (Select Z6 press and hold Ctrl and select AB6)
In conditional formatting select new rule
Select Use a formula to determine which cells to format

use this formula
Code:
=ABS($Z$6-$AB$6)>=2

Select your formatting
Press OK
 
Upvote 0

Forum statistics

Threads
1,223,577
Messages
6,173,164
Members
452,504
Latest member
frankkeith2233

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top