Hi
There are proably quite a few ways of doing this but I use a function called EOMONTH.
This returns the last date of a given month.
Note that the function is in the analysis toolpak addin, therefore this needs to be loaded/referenced for the function to become available.
To install it go TOOLS>ADD INS and check the toolpak. I'd also check the VBA toolpak for goodmeasure and incase you may need it in future.
As an example, if you have a date in cell B1 this formula will return the number of days in the month for that date
=DAY(EOMONTH(B1,0))
Enjoy!
;-)
If a man says something and there are no women there to hear him, is he still wrong?
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.