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
[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 64"][TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]column B[/TD]
[/TR]
[TR]
[TD]300[/TD]
[TD]350[/TD]
[/TR]
[TR]
[TD]200[/TD]
[TD]201[/TD]
[/TR]
[TR]
[TD]150[/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]

[/TD]
[TD="class: xl67, width: 64"][/TD]
[/TR]
</tbody>[/TABLE]
I tried this, but it did not work
=OR(AND((A2-B2)>50,(A2-B2)<-50))

TIA..
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
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
Column Acolumn B

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:142px;"><col style="width:142px;"></colgroup><tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]1[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]350[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]201[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] , align: right"]150[/TD]
[TD="align: right"]50[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]5[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] , align: right"]300[/TD]
[TD="align: right"]351[/TD]

</tbody>

Conditional formatting
CellNr.: / ConditionFormat
A21. / Formula is =OR(A2-B2>50,A2-B2<-50)

<tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "]Abc

<tbody>
A31. / Formula is =OR(A2-B2>50,A2-B2<-50)
A41. / Formula is =OR(A2-B2>50,A2-B2<-50)
A51. / Formula is =OR(A2-B2>50,A2-B2<-50)

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "]Abc[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "]Abc[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "]Abc[/TD]

</tbody>
[/TD]

</tbody>


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

Forum statistics

Threads
1,223,889
Messages
6,175,226
Members
452,620
Latest member
dsubash

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