Conditional formatting for plus or minus the SD

herm0154

New Member
Joined
Oct 1, 2013
Messages
7
Hello,

I need some help, I can't figure out how to do this right. I have a set of averages that I want to compare (columns c, d...au) to avg 1(column a). I need to highlight those cell averages that are greater than or equal to or less than or equal to the avg1 plus or minus the SD. How can I do a formula or conditional formatting to have those columns that are plus or minus the SD to appear in red (or any color)?

Thanks in advance for your help!



ABCD
Avg 1SD Avg 2Avg 3
2.08.973.51.1
3.191.243.22
3.141.211.53.1
2.18.8922.8
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Try:

Book1
ABCD
1Avg 1SDAvg 2Avg 3
22.080.973.51.1
33.191.243.22
43.141.211.53.1
52.180.8922.8
Sheet47
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:D5Expression=OR(C2>=$A2+$B2,C2<=$A2-$B2)textNO


Of course, adapt the selected range to include your whole data set.
 
Upvote 0
So this should highlight anything outside of the SD Range

MrExcelPlayground6.xlsx
ABCD
1Avg 1SDAvg 2Avg 3
22.080.973.51.1
33.191.243.22
43.141.211.53.1
52.180.8922.8
Sheet9
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:D5Expression=OR(($A2+$B2)<C2,($A2-$B2)>C2)textNO
 
Upvote 0
Try:

Book1
ABCD
1Avg 1SDAvg 2Avg 3
22.080.973.51.1
33.191.243.22
43.141.211.53.1
52.180.8922.8
Sheet47
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:D5Expression=OR(C2>=$A2+$B2,C2<=$A2-$B2)textNO


Of course, adapt the selected range to include your whole data set.
This is great. Thanks.
Follow up question, what if I wanted to highlight cells that were equal to or greather or equal to or less than half the SD?
 
Upvote 0
So this should highlight anything outside of the SD Range

MrExcelPlayground6.xlsx
ABCD
1Avg 1SDAvg 2Avg 3
22.080.973.51.1
33.191.243.22
43.141.211.53.1
52.180.8922.8
Sheet9
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:D5Expression=OR(($A2+$B2)<C2,($A2-$B2)>C2)textNO
This is great. Thanks.
Follow up question, what if I wanted to highlight cells that were equal to or greather or equal to or less than half the SD?
 
Upvote 0
Just change it to:

Excel Formula:
=OR(C2>=$A2+$B2/2,C2<=$A2-$B2/2)

I assume you meant cells that differ from Average 1 by half the SD.
 
Upvote 0
Just change it to:

Excel Formula:
=OR(C2>=$A2+$B2/2,C2<=$A2-$B2/2)

I assume you meant cells that differ from Average 1 by half the SD.
I guess I should elaborate, if I want to make sure I highlight red (for example), the cells that are +/- the SD but then I also want to highlight (yellow) the cells that are within half of the SD (+/-) how to I make sure that they do not overlap? Do you know what I mean?
 
Upvote 0
You'd need 2 rules, one for red, one for yellow:

Book1
ABCD
1Avg 1SDAvg 2Avg 3
22.080.973.51.1
33.191.243.22
43.141.211.53.1
52.180.8922.8
Sheet47
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:D5Expression=OR(C2>=$A2+$B2,C2<=$A2-$B2)textNO
C2:D5Expression=OR(C2>=$A2+$B2/2,C2<$A2-$B2/2)textNO


But you need to make sure they are in the right order as shown. If they aren't, then you'll get all yellow, or no yellow. Use the Manage Rules dialog to put them in the right order if you need to.
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,677
Members
449,092
Latest member
tayo4dgacorbanget

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