if statement syntax help

  • Thread starter Thread starter OfficeManager
  • Start date Start date
O

OfficeManager

I have been reading a lot about conditional formatting. I have cells in D2
that I want highlighted in yellow if g2>5 and i2>69%. If g2 and i2 do not
both meet the criteria, I don't want anything to happen to d2. I'm assuming
I can use conditional formating for that, but how do I write it?
 
Try this...

Select cell D2
Goto the menu Format>Conditional formatting
Select the Formula Is option
Enter this formula in the little box on the right:

=AND(COUNT(G2,I2)=2,G2>5,I2>69%)

Click the Format button
Select the desired style(s)
OK out
 
Thanks so much. Now, can I count all the cells in column D that have the
conditional formatting of a yellow cell?
 
Hi,

Counting cells coloured with a conditional format isn't easy but the subject
is covered in depth here.

http://www.xldynamic.com/source/xld.CFConditions.html

If that proves a bit overwhelming then you can count the conditions that set
the conditional format which has the same effect. For example

=SUMPRODUCT((G2:G23>5)*(I2:I23>69%))

Would count that range where both conditions were met on each row.

Mike
 
Back
Top