# Help with conditional formatting formula

#### Im_Offset

##### Member
Hello to all you excellent excelers:

I am unable to figure out the correct formula for this conditional formatting need:

in column B from B2:B7 is a range of numbers that have been manually entered.
For example:
100
110
120
130
140
150

in column C from C2:C7 is another range of numbers that have been calculated by a formula.

What I want to do is conditionally highlight a number in column C if it is not equal to the number in the same row in column B by +/- 1.
So if B2 is 100 and C2 is 101 then it would not be highlighted
But if B3 is 110 and C3 is 115, then it would be highlighted because it is not between B3 +/-1 (i.e. 109 to 111).

What formula would I write in the conditional formatting tool in order to get the cells in Column C to highlight if they are not within a range of +/- 1 of their counterpart in column B?

Thank you in advance for helping me because, clearly,
Im_Offset #### pecoflyer

##### Active Member
Select B2:B7 and apply following CF =AND(\$B2<\$C2-1,\$B2>\$C2+1) and format as required

• Im_Offset

#### Im_Offset

##### Member
Select B2:B7 and apply following CF =AND(\$B2<\$C2-1,\$B2>\$C2+1) and format as required
Thanks you!

You're welcome