Change cell background based on multiple cells

O

oooprettyflowers

This is what I'm trying, unsuccessfully, to do:

If the value of A1 is "Hourly" AND the value of C3 is <10, change the
background to yellow
If the value of A1 is "Salary" AND the value of C3 is >14, change the
background to green

I have been unable to do this using conditional formatting.
Can someone help with VB?

Thanks!!
 
P

Peo Sjoblom

Formula is

=AND($A$1="Hourly",$C$3<10)


2nd condition


=AND($A$1="Salary",$C$3>14)


works for me
 
O

oooprettyflowers

Thanks!

Now I'm having another problem with it.

This is going to be part of a macro, and the number of rows may change
with each worksheet.

When I apply the formatting to the entire column, which includes a
header row, the highlighed cells are shifted up one row because the
header is included.
So my question is, how can I exclude the header and have the correct
cells highlighted?
 
Top