View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Conditional formatting formulas

No need for IF, you just need an expression that evaluates to TRUE or FALSE
I selected D1:D20 and entered the conditional format:
Formula IS: =C1=0 and set the pattern to yellow.
The cells in D1:D20 are now yellow filled if the corresponding C cell is
zero or blank.
If I want yellow when there is a zero in adjacent cell but not when it is
blank then I use
=AND(NOT(ISBLANK(C1)),C1=0)
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Kobus" wrote in message
...
How do I use the "if" function referring to an adjacent cell in
"conditional
formatting" eg. I want a cell to turn yellow when the vallue in the
adjacent
cell =0