formula for changing cell color

S

solo_razor

hello,

Does anybody know a formula for changing cell color's within a certai
range?

regards,
nie
 
T

Tom Ogilvy

The constant vbYellow is an RGB Long and would only be used with the color
property
Range("B5:B10").Interior.Color = vbYellow

vbYellow has a value of 65535

color indexes for specific colors are 1 to 56

yellow is colorindex 6

Range("B5:B10").Interior.ColorIndex = 6
 
S

sjvenz

In Conditional format you can sepecify if the cell is greater than 0
which would then give you a true value to change the colour of the
cell.
 
P

pikus

On the main menu select
Format --> Conditional Formatting...

The window that pops up will make it pretty clear how to set that up.
And you can click the "Add>>" button to get up to three tota
conditional formats. - Piku
 
Top