colors


Posted by Lewis on May 18, 2001 5:36 PM

Is there a macro or somthing that can go through a set block of cells and if the cells value is < say 90 change the color to something else?

thanx

-Lewis

Posted by Capulet Mercutio on May 18, 2001 5:59 PM

Dim cell As Range
For Each cell In 'your range'
If cell.Value < 90 Then cell.Interior.ColorIndex = 3
Next




Posted by Dave Hawley on May 19, 2001 12:32 PM

Hi Lewis

Excel has a built in feature fo this called "Conditional Formatting", it can be found under "Format" on the MenuBar.

Let's say the range you want to color cells that are greater than 90 is A1:D100.

Select the range.
Go to Format>Conditional formatting.
Select "Greater than"
Type: 90
Click "Format" and make your choice.
Click Ok then Ok again

Any good ?


Dave

OzGrid Business Applications