Conditional formatting??

vvvalerie

New Member
Joined
Nov 11, 2009
Messages
8
This is probably really simple, but I am looking for the easiest way to do this in Excel 2007..

I have to turn a cell yellow at non-sequential numbers ie: normal at 1-3, yellow at 4, green at 5, back to normal, yellow at 9, green at 10...

How would I go about doing this?

Thanks!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
For Yellow (4,9,14,19,etc)
=MOD(A2,5)=4

For Green (5,10,15,20, etc)
=MOD(A2,5)=0

All else (1,2,3,6,7,8,11,12,13,etc) will remain unformatted.


Hope that helps.
 
Upvote 0
That does help - I got it to do it for the 4 values with that formula, but for some reason, it wouldn't work with the other values? I uploaded a copy of the workbook with the data removed from it - row 5 is the one that will need to be changing to green or yellow. It is the entire row, but if I can get the formula working for 1 cell, I can do it for all. The value in the cells in row 5 can go up to an infinite number.

http://www.zshare.net/download/89771732d64e1694/

Sorry - I am EXTREMELY rusty with Excel.. haven't had to do much with it in quite a while.
 
Upvote 0
Highlight the WHOLE row from B5 to AA5
go to conditional formatting - new rule - use a formula

Then enter the formula as given above and apply the format
You'll have to make 2 rules, one for yellow ( mod(..)=4 ) one for green ( mod(..)=0 )
 
Upvote 0
Still not working - I get the entire row changing to yellow or green instead of the cells changing color depending on what their value is.

Edit - nevermind, I fixed it. I had to take out the $ signs... didn't think it would matter.

Thanks for your help!
 
Last edited:
Upvote 0
make sure you're not using absolute references...

Use
=MOD(A2,5)=4

NOT
=MOD($A$2,5)=4
or
=MOD($A2,5)=4
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,733
Members
452,939
Latest member
WCrawford

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