If you load the analysis toolpak you have EOMONTH in e2003 but here's an
alternative non ATP method. Chane the 1 after the month to change the month
=DATE(YEAR(A1),MONTH(A1)+1,0)
--
Mike
When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
EOMonth requires the analysis toolpak to be added in which you can do in
2003. That being said you can accomplish the same thing similar to this...
With a Date in A1 and the number of months to increment in B1 your EOMonth
would look like this:
=EOMONTH(A1, B1)
Which can be done like this
=DATE(YEAR(A1), MONTH(A1) + B1 + 1, 0)
which does not require the analysis toolpak and will work in all version of
XL.
When you leave off the day from the inputs Excel picks the last day of the
prior month, so when you use Month(A1)+1 you get the last day of the current
month.
Even works for leap years 2/15/2004 in A1 yields 2/29/2004.
Kind of an odd quirk, like it is picking the 0th day of the month. Not sure
if this was intentional on the programmers part, but it works.
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.