Conditional formatting with original data

philro

New Member
Joined
Dec 20, 2009
Messages
17
I"m trying to create a heat map in Excel by essentially finding the Z statistical value of normal distribution and coloring values far from the mean using conditional formatting. I calculate the Z as
=ABS(AI2-AVERAGE(AI$2:AI$71))/STDEV(AI$2:AI$71) in each cell from the derived data above.
The values in the heat map are generally between 0-3 as you would suspect. But the colored heat map is over the calculated Z values.
Can i have the colored cells with the original derived data not the Z values?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi there,
I hope this will do what you want. I think you just need to put the abs value formula in the conditional formatting itself.

Column A contains some numbers (generated by 10*rand() in each cell).
Column C is your Z formula applied to each cell in column A (purely to show that the highlighted z values are correct). You don't need anything in column C.

1624454271277.png

But the conditional formatting is applied to column $A$1:$A$10 as shown.

1624454694382.png


Formulas are

Red: =ABS(A1-AVERAGE(A$1:A$20))/STDEV(A$1:A$20)>=3
Orange: =AND(ABS(A1-AVERAGE(A$1:A$20))/STDEV(A$1:A$20)>=2,ABS(A1-AVERAGE(A$1:A$20))/STDEV(A$1:A$20)<3)
Yellow: =AND(ABS(A1-AVERAGE(A$1:A$20))/STDEV(A$1:A$20)>=1,ABS(A1-AVERAGE(A$1:A$20))/STDEV(A$1:A$20)<2)
Green: =AND(ABS(A1-AVERAGE(A$1:A$20))/STDEV(A$1:A$20)>=0,ABS(A1-AVERAGE(A$1:A$20))/STDEV(A$1:A$20)<1)

Apologies if this doesn't do what you wanted.
 

Attachments

  • 1624454442539.png
    1624454442539.png
    6.5 KB · Views: 6
  • 1624454471089.png
    1624454471089.png
    2.9 KB · Views: 6
Upvote 0
I think it's a great answer. Thank you very much. I'll give it a try shortly. Very much appreciate your time.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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