Change cell background based on multiple cells

  • Thread starter Thread starter oooprettyflowers
  • Start date Start date
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!!
 
Formula is

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


2nd condition


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


works for me
 
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?
 

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

Back
Top