Conditional Format

R

Randy

I'm wanting to shade a cell if 2 conditions are true. They problem I am
having is that one of the cells uses the VLOOKUP function. I can get the cell
to change colors if I specify just one condition. Example:
=AND(B4=F277,B6=0). I want a range of cells to be specified. When I try
this, the condition doesnt work. Such As: =AND(B4=F277:F284,B6=0). I've even
tried: =AND(B4=$F$277:$F$284,B6=0). How can I specify a range of cells in a
conditional format? Should I be using an IF statement?
 
R

Rick Rothstein

I'm not totally clear what your test is supposed to be. Does this do what
you want?

=AND(COUNTIF(F277:F284,B4)>0,B6=0)
 
R

Randy

That works great, but i should have been more specific. I want cell B6 to be
shaded. Sorry for not saying that in my first post.
 
R

Randy

Yes! That works perfect. Thanks for the help.

Rick Rothstein said:
I'm not totally clear what your test is supposed to be. Does this do what
you want?

=AND(COUNTIF(F277:F284,B4)>0,B6=0)
 

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