Create Rule on Conditional Formatting

NNOG28

New Member
Joined
Feb 28, 2019
Messages
11
I would like to know how I can create rule to highlight when column A - b > 50, and <-50
Column Acolumn B
300350
200201
15050

<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

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
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:
Upvote 0
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?
 
Upvote 0
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
 
Upvote 0
It worked ... thank you so much

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

Sheet4

AB
1Column Acolumn B
2300350
3200201
415050
5300351

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

Conditional formatting
CellNr.: / ConditionFormat
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

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,462
Members
449,085
Latest member
ExcelError

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