VB - turning cells specified colours

F

Fraggs

How can I make cells turn a specified colour if certain criteria i
met.

for example if,
-1015+1015 = exactly 0, Cell turns green
else if
-1015+number = anything execpt 0, Cell turns red.

Any ideas
 
D

Doug Van

Have you looked at conditional formatting? I don't know how many different
scenarios you have. Conditional formatting only supports three.
 
H

Harald Staff

Does it have to be with VB code ? Conditional formatting (Format menu) is
far easier.

Why are so many newsgroup postings channeled through Excelforum saying "any
ideas?" by the way ?
 
B

Byron

Take a look at "conditional formating". You should be
able to accomplish what you want.

Byron
 
K

kkknie

First format your cells to be green.

Then select your cells then from the Format menu, choose Conditional
formatting. Set up the first format with Not Equal To 0 and then click
the format button and select Red.

It's pretty self-explanatory.

K
 
F

Fraggs

Why are so many newsgroup postings channeled through Excelforum saying
"any ideas"?

Huh? I just said any ideas at the end cos I was clueless and it leaves
the question more open than saying, only people who deffinatly know how
to solve this answer me. I'm open to all and any suggestions.
 
V

VDM

In Excel

Click on Format

Conditional Formatting

Set your first condition.

Click Add

Set your second condition.

Click Add

Set your third condition.

Click OK
 
Top