conditional formatting based on the value of another cell

B

bwilde

I want to apply a conditional format to a cell based on the value of another
cell having nothing to do with the value of the cell I want the format to
effect. for example - if the value in cell m5<0 i want cell a5 to be italic
(regardless of the value in a5)
 
D

David Biddulph

You need to use the CF/ Formula Is ... option, rather than CF/ Cell Value Is
....
then you can use Formula Is =M5<0
 
B

bwilde

thank you - would you also know how I can have more than one condition - I
want to say if m22<=0 OR r22<=0 OR x22<=0 format green - I'm doing something
wrong
 
D

David Biddulph

Perhaps you haven't looked at the Excel help for the OR function?
That will tell you the syntax of the function.
 
B

bwilde

I did and I still can't seem to get it right. when i use OR either I get an
error or if I don't get and error the CF doesn't work
 
D

David Biddulph

Show us the formula you have used in your CF/ Formula Is condition, then we
can tell you what you've got wrong.
 
B

bwilde

If I put = M22<0 OR =R22<0 OR =X22<0 I get an error. If I put (= M22<0) OR
(=R22<0) OR(=X22<0) it changes it to ='(= M22<0) OR (=R22<0) OR(=X22<0)' and
there's no error but it doesn't work.
 
D

David Biddulph

In that case you need to look again at the Excel help for the OR function.

It tells you that the syntax is OR(logical1,logical2,...)
and gives examples such as =OR(1+1=1,2+2=5)

It doesn't say =logical1 OR =logical2
 
B

bwilde

the excel help wasn't as helpful as you! =OR(M31<0,R31<0,X31<0) works thank
you so much.
 

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