Advanced Conditional Formatting Help Required - Change cell colour based on values of other cells

G

gregglazar

I have developed the logic I require, I just need some help in writing
the code to do it as I haven't used Excel for quite some time.

Basically, I need the code to perform the following:

Example:

If Y2 or AA2 > 0 and Z2 = 0, I need to change the colour of cell Z2 to
red.

I need to perform this function not only on row 2, but on rows 2 to
5642

Any help will be much appreciated.
 
T

Tom Ogilvy

go to the name box on the left of the formula bar and enter

2:5642
hit enter

This should select rows 2:5642 with cell A2 as the activecell

Do Format=>Conditional Format

Change the first dropdown from Cell Value Is to Fromula is.

Put in this formula

=AND(OR($Y2>0,$AA2>0),$Z2=0,IsNumber($Z2),or(isnumber($Y2),isnumber($AA2)))

select your format and OK out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top