Is there a function that gives us the last day of a month

G

Grd

Hi,

I need to get the last day of a month i.e 30/nov/05 out of todays date.
How do I go about this? Its driving me crazy.

Any help appreciated

Gordon
 
D

Duke Carey

Go to Tools->Add-ins and make sure you have Analysis Toolpak checked, so that
you have access to

=EOMONTH()
 
P

PCLIVE

Assuming A1 contains the date: 11/10/2005

If you want the number of days in a given month:
=DAY(DATE(YEAR(A1),MONTH(A1)+1,0))

If you want the last day of a given month:
=DATE(YEAR(A1),MONTH(A1)+1,0)

HTH,
Paul
 
R

Ron Coderre

Where A1 contains a date:


If you have the Analysis ToolPak installed:
=EOMONTH(A1,0)

Using regular Excel functions:
=DATE(YEAR(A1),MONTH(A1)+1,0)

Does that help?

••••••••••
Regards,
Ron
 
Top