conditional format

T

TC

Hi - wonder if someone can help me with this one

What would be the conditional format for - if current month = date in cell
A1 then apply format.

i.e. date in cell A1 is dd/mm/yyyy, and I want format to apply for whole
month.

Many thanks
 
R

Ron Rosenfeld

Hi - wonder if someone can help me with this one

What would be the conditional format for - if current month = date in cell
A1 then apply format.

i.e. date in cell A1 is dd/mm/yyyy, and I want format to apply for whole
month.

Many thanks

=MONTH(A1)=MONTH(TODAY())


--ron
 
T

TC

Ron - thanks works a treat

One refinement

The date is always in row 1 (A1, B1, C1 etc) and the fomatted cells are rows
2 to 35. When I use the format in A2 then copy/paste special the format to
A3, B4 etc it assumes that the date is in the same relative position. what
is the syntax to say that the date is always in row 1.

Thanks again
 
R

Ron Rosenfeld

Ron - thanks works a treat

One refinement

The date is always in row 1 (A1, B1, C1 etc) and the fomatted cells are rows
2 to 35. When I use the format in A2 then copy/paste special the format to
A3, B4 etc it assumes that the date is in the same relative position. what
is the syntax to say that the date is always in row 1.

Thanks again


You just need to use mixed reference for your cell reference:

e.g.: A$1


=MONTH(A$1)=MONTH(TODAY())



--ron
 
T

TC

Last question - honest

I should have said, I need the conditional format to match the month AND
year, not just the month otherwise it occurs for multiple years. Been trying
to worth this out for an hour or so, but no luck.

Is there a good website for this type of syntax ?

Thanks again
 
P

Peo Sjoblom

=AND(MONTH(A1)=MONTH(TODAY()),YEAR(A1)=YEAR(TODAY()))

or

=DATE(YEAR(A1),MONTH(A1),1)=DATE(YEAR(TODAY()),MONTH(TODAY()),1)
 
Top