color for last day of each month

G

Guest

Hello from Steved

I have an 12 month excel calendar

I would like to have the last day of each month have a light yellow.

If this is possible how.

Thankyou.
 
R

RB Smissaert

Something like this will give you all the last days of the month:

Sub test()

Dim i As Byte

For i = 1 To 12
MsgBox DateSerial(Year(Date), i, 1) - 1
Next

End Sub


RBS
 
B

Barb Reinhardt

Format -> Conditional Formatting

I'm trying formula is

=EOMONTH(A1,0)=A1
and I think it should work. I'm getting an error "You may not use
references to other worksheets or workbooks for Conditional Formatting
criteria". Maybe someone else can assist.
 
R

Ron Rosenfeld

Hello from Steved

I have an 12 month excel calendar

I would like to have the last day of each month have a light yellow.

If this is possible how.

Thankyou.


You can use conditional formatting. "Formula Is:"

One formula that will return TRUE if the date in the cell is the last day of
the month is:

=MONTH(A1)<>MONTH(A1+1)


--ron
 
R

Ron Rosenfeld

Format -> Conditional Formatting

I'm trying formula is

=EOMONTH(A1,0)=A1
and I think it should work. I'm getting an error "You may not use
references to other worksheets or workbooks for Conditional Formatting
criteria". Maybe someone else can assist.


That won't work because EOMONTH is an ATP function, which is presently in a
separate workbook. I understand the ATP functions will become part of Excel in
Excel 12.

Try: =Month(a1)<>Month(a1+1)


--ron
 
G

Guest

Hello from Steved

Thankyou.

Ron Rosenfeld said:
You can use conditional formatting. "Formula Is:"

One formula that will return TRUE if the date in the cell is the last day of
the month is:

=MONTH(A1)<>MONTH(A1+1)


--ron
 

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