View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Conditional formatting

"ellinor2304" wrote:
.. So for example cell S23 would have to have something like:
in the row C2 to N2, take the cell that is in the column
for the current month and if that cell 0,
color S23 green; if not, color S23 red.
Is this possible with conditional formatting? ..


Re above description, you could try this

Assume C1:N1 contains the text: April, May, ... March
(ie the 12 calendar months in "mmmm" format)

First, just normally format S23 with red fill (via FormatCells)

Then select S23, apply conditional formatting using Formula Is:
=OFFSET(B2,,MATCH(TEXT(TODAY(),"mmmm"),$C$1:$N$1,0 ))0
Format Green fill Ok out

The above will return the required CF for S23. If cell K2 -- ie the cell
within C2:N2 just below the label "December", the current month -- contains a
value other than zero, then S23 will be filled green as desired. Otherwise,
the normal format applied, ie red, will display.

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---