caino41

New Member
Joined
Jan 20, 2010
Messages
10
In 2003, I want to apply conditional formatting to a cell that is summing monthly data (12 cells with data added to each subsequent cell by month). I want that cell to average any data entered in the monthly cells, then provide a background color based on parameters (let's say the monthly target is 10): between 70% and 130%, green; between 50% and 70%, yellow; between 130% and 150%, yellow; and below 50% or above 150%, red. Any thoughts or input would be helpful.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Actually you can have more than 3 conditions - the limit is 3 formats.

Mind you the conditions you want to use aren't particularly clear - to me anyway.:)
 
Upvote 0
Lynn, there only are 2 conditions?

Monthly Data in Colums A to N, Target in Column M, Conditional format applies to M

- Standard format red fill

1st Condition - yellow fill:
=OR(AND(M2=>0.5*AVERAGE(A2:N2),M2<=0.7*AVERAGE(A2:N2)),AND(M2=>1.3*AVERAGE(A2:N2),M2<=1.5*AVERAGE(A2:N2)))

2nd condition - green fill:
=AND(M2>0.7*AVERAGE(A2:N2),M2<1.3*AVERAGE(A2:N2))
 
Upvote 0
Not sure what you mean by standard red fill and if that is a "Formula Is" or a "Cell Value Is." I put your yellow and green in under "Formula Is." Is that correct?
 
Upvote 0
There was a small mistake in my Formulas, which I have adjusted now.

According to your question, your cells should always be red if neither the condition for yellow nor the condition for green are fulfilled. Therefore you can just format the background of all cells in that column to be red. That's what I mean with standard fill.

Have a look at the following example to understand the workings of the formulas. For ease of reading I have put the formulas used for conditional formating of Column M in columns N-P. Copy the example in a blank workbook and play with the numbers. Evaluating the formula in O2 & P2 will also aid understanding.


Excel Workbook
ABCDEFGHIJKLMNOP
1JanFebMarAprMayJunJulAugSepOctNovDecTarget
21234567891011124FALSCHWAHR
36,56,75
4<0.5
5=>0.5<=0.73,375
6>0.74,55
7<1.38,45
8=>1.3<=1.510,125
9>1.5
Tabelle1
Cell Formulas
RangeFormula
O2=AND(M2>0.7*AVERAGE(A2:L2),M2<1.3*AVERAGE(A2:L2))
O3=AVERAGE(A2:L2)
O6=O3*0.7
O7=O3*1.3
P2=OR(AND(M2<=0.7*AVERAGE(A2:L2),M2>=0.5*AVERAGE(A2:L2)),AND(M2<=1.5*AVERAGE(A2:L2),M2>=1.3*AVERAGE(A2:L2)))
P3=AVERAGE(B2:M2)
P5=P3*0.5
P8=P3*1.5


Best regards,

Stephan
 
Last edited:
Upvote 0
Stephan,

Thank you very much for all the work you put into your response. The numbers look good and my problem is solved!

Thanks again,
Dave
 
Upvote 0
BTW, Conditional Formatting would be a better subject for this thread than Dave
 
Upvote 0
But hardly worth hassling an admin over hotpepper, which would be the only way to change the thread title now. After all, there are a felt 1million threads with the title "Conditional Formating" on this here board. Had Dave used google he might even have found the solution without posting another one of those. Mind you, try to come up with a good, descriptive thread title or indeed search string if you never heard of conditional formatting :)
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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