# Create Rule on Conditional Formatting

#### NNOG28

##### New Member
I would like to know how I can create rule to highlight when column A - b > 50, and <-50
 Column A column B 300 350 200 201 150 50

<tbody>
</tbody>

<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>
</tbody>
I tried this, but it did not work
=OR(AND((A2-B2)>50,(A2-B2)<-50))

TIA..

### Excel Facts

Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

#### MARK858

##### MrExcel MVP
I would like to know how I can create rule to highlight when column A - b > 50, and <-50

Can you explain your criteria again as it can't be both greater than 50 and less than -50 as there will never be a match?

Maybe you meant greater than -50 and less than 50?

Last edited:

#### NNOG28

##### New Member
I want to compare the change of the numbers between 2 weeks. Let's say I am comparing store count of this year and last year on each product. and I want to highlight on this year number whenever it is 50 more store counts than last year, or highlight if it is 50 less store counts than last year.

Does it make sense?

#### MARK858

##### MrExcel MVP
Then you just need the OR not the AND...

Excel Workbook
AB
1Column Acolumn B
2300350
3200201
415050
5300351
Sheet4
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A21. / Formula is =OR(A2-B2>50,A2-B2<-50)Abc
A31. / Formula is =OR(A2-B2>50,A2-B2<-50)Abc
A41. / Formula is =OR(A2-B2>50,A2-B2<-50)Abc
A51. / Formula is =OR(A2-B2>50,A2-B2<-50)Abc

#### NNOG28

##### New Member
It worked ... thank you so much

Then you just need the OR not the AND...

Sheet4

 A B 1 Column A column B 2 300 350 3 200 201 4 150 50 5 300 351

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:142px;"><col style="width:142px;"></colgroup><tbody>
</tbody>

Conditional formatting
 Cell Nr.: / Condition Format A2 1. / Formula is =OR(A2-B2>50,A2-B2<-50) Abc A3 1. / Formula is =OR(A2-B2>50,A2-B2<-50) Abc A4 1. / Formula is =OR(A2-B2>50,A2-B2<-50) Abc A5 1. / Formula is =OR(A2-B2>50,A2-B2<-50) Abc

<tbody>
</tbody>

<tbody>
</tbody>

Excel tables to the web >> Excel Jeanie HTML 4

Replies
2
Views
164
Replies
3
Views
38
Replies
6
Views
180
Replies
5
Views
49
Replies
5
Views
488

1,129,557
Messages
5,637,040
Members
416,955
Latest member
Gohar hussain

### 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.

### Which adblocker are you using?

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

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