EOMONTH may not always be available it seems: http://office.microsoft.com/en-001/excel-help/eomonth-HP005209076.aspx - so if anybody can't use Micky's cool shorter version, the original formula should still do the trick :)

I want to get result by giving name of month like "January", "February" etc. instead of given date in cell B3. Is it possible? if yes, anybody please help me soon. Thanks

There seems to be no "get previous month" function in OpenOffice (and I don't have MS Office installed right now), so I came up with this formula which seems to work:

=DATE(YEAR(a1);MONTH(a1)-1;1)

It gives you the first day of the previous month of a date in field a1. To get the length of that previous month, just use the same formulas from this post on the date you have thus obtained.

If possible I want to get result by giving name of month like “January”, “February” etc. instead of given date in cell A1. Is it possible? if yes, anybody please help me soon @ nishantverma8391@gmail.com

Really excellent. Thanks.

ReplyDeleteNo need or such a "long" formula.

ReplyDeleteIn B2 type: =DAY(EOMONTH(B3,0))

Michael Avidan

“Microsoft®” MVP – Excel

ISRAEL

Thanks Micky!

ReplyDeleteEOMONTH may not always be available it seems: http://office.microsoft.com/en-001/excel-help/eomonth-HP005209076.aspx - so if anybody can't use Micky's cool shorter version, the original formula should still do the trick :)

Thanks Micky!!!!

ReplyDeleteThanks Mr. Nils & Mr.Micky

ReplyDeleteAwesome, one click answer, thanks.

ReplyDeleteNow, can we calculate just the weekdays in a month with a similar method?

I want to get result by giving name of month like "January", "February" etc. instead of given date in cell B3. Is it possible? if yes, anybody please help me soon. Thanks

ReplyDeleteSaiful, that's simply a matter of assigning the cell a custom date format, I'd say.

ReplyDeleteTHANKSSSSSSSSSSSSSSSSSSSSS

ReplyDeleteTHANKS MICKY BRO

ReplyDeletehow do we get for previous month is there

ReplyDeleteany formula for that

Hey Linto,

ReplyDeleteThere seems to be no "get previous month" function in OpenOffice (and I don't have MS Office installed right now), so I came up with this formula which seems to work:

=DATE(YEAR(a1);MONTH(a1)-1;1)

It gives you the first day of the previous month of a date in field a1. To get the length of that previous month, just use the same formulas from this post on the date you have thus obtained.

Thanks a lot

ReplyDeletethanks a lot......perfect formula to get a number of days in a month.....

ReplyDeletethank you.:)

ReplyDeletethank you michael..

ReplyDeleteThanks A lot

ReplyDeleteIf possible I want to get result by giving name of month like “January”, “February” etc. instead of given date in cell A1. Is it possible? if yes, anybody please help me soon @ nishantverma8391@gmail.com

ReplyDeleteThanks the formula works

ReplyDelete@Nishant ..did u get the solution..pls post,if yes

ReplyDelete