Use vba to format a cell green if >87.

haxxbb

New Member
Joined
Apr 27, 2011
Messages
7
Im making a report manualy today and i would like a vba to do it automaticly. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p> </o:p>
I have want to have a conditional formatting on cells e8 to e35 to green if value over 77<o:p></o:p>
And another conditional formatting on cells f8 to f35 to green if over 90. <o:p></o:p>
<o:p> </o:p>
Seems fine enoght.. This is the reason why im posting here. <o:p></o:p>
<o:p> </o:p>
Format 1 if value in celle 8 to 35 is equal or over 77 set color green in cell. Its suppose to do this in colum e, h k and all the way to IO. So do one colum with format 1 ignore the next 2 colums, then do 1, ignore the next 2. Etc <o:p></o:p>
<o:p> </o:p>
Format 2 if value in celle 8 to 35 is equal or over 90 set color green in cell. Its suppose to do this in colum f, i l and all the way to IP. So do one colum with format 2 ignore the next to colums, then do 1, ignore the next to one. Etc <o:p></o:p>
<o:p> </o:p>
Cells in row 7 have value (in text) other then x and y, if you gonna use that please just write “xvalue” “xvalue” or something.<o:p></o:p>
<o:p> </o:p>
See pic it its still unclear. <o:p></o:p>
<o:p> </o:p>
http://img685.imageshack.us/i/mrexcel.png/<o:p></o:p>
<o:p> </o:p>
Thanks in advance<o:p></o:p>
 
You must be overlooking something. I just tried copying the formulas from the post into CF and it works as expected. When E is greater that 77, columns E,H,K,N,Q etc are Colored
When F is greater than 90, columns F,I,L,O,R etc are colored. Is that not what you want??

lenze
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
You must be overlooking something. I just tried copying the formulas from the post into CF and it works as expected. When E is greater that 77, columns E,H,K,N,Q etc are Colored
When F is greater than 90, columns F,I,L,O,R etc are colored. Is that not what you want??

lenze

Yes, it is. But only if the cell value in e is over 77. So e8 has 77 so it gets green, e9 has 70 so it stays white. And so on and so on.

This is a pic of what happens on my screen when i try:

http://img64.imageshack.us/i/everything.png/
 
Upvote 0
I do not know why you are getting the error message. The formula you have is EXACTLY the same as I used and it works fine for me!!!
Maybe you have a space at the end of the formula. Try retyping it! Also, Try entering the formula in H8 and see what it evaluates to. True or False??

lenze
 
Upvote 0
I do not know why you are getting the error message. The formula you have is EXACTLY the same as I used and it works fine for me!!!
Maybe you have a space at the end of the formula. Try retyping it! Also, Try entering the formula in H8 and see what it evaluates to. True or False??

lenze

I just get a error messange on the formula no matter what i try. However i found another way to solve the problem. It is elegant but i works. mark e8:26. set cf value => 77. Copy the area, mark all the other places and paste special format only.

Thanks for all the help! :)
 
Upvote 0

Forum statistics

Threads
1,215,751
Messages
6,126,671
Members
449,326
Latest member
asp123

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