Number of days in a month

Don C

Board Regular
Joined
Feb 24, 2002
Messages
72
The function WEEKDAY will tell me the day of the week that a date falls on.

How can I determine the number of days in the month of that date?

In cell A2, I enter a date, say 1/1/2003 and I want to know the number of days in January.

(I know, I can look on a calendar, but I'd like some sort of automation. Next year is a Leap Year and I'd like the calendar I am building to know that.)

Thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Dear

insert table as following :

Column B (B1) Month, (B2) Jan-2015 , (B3) Feb-2015 , (B4) Mar-2015 ..... till Dec-2015
Column C (C1) Month No., (C2) =MONTH(B2), (C3)=MONTH(B3), (C4)=MONTH(B4)....till =MONTH(B13)
Column D (D1)Days, (C2) =DAY(EOMONTH(B2,0)), (C3)=DAY(EOMONTH(B3,0)), (C4)=DAY(EOMONTH(B2,0))....till =DAY(EOMONTH(B13,0))

then follow the following Equation assumed that date is 24 Aug 2015 in Cell G2 :

=VLOOKUP((MONTH(G2)),$C$1:$D$13,2,0)
 
Upvote 0
The function WEEKDAY will tell me the day of the week that a date falls on.

How can I determine the number of days in the month of that date?

In cell A2, I enter a date, say 1/1/2003 and I want to know the number of days in January.

(I know, I can look on a calendar, but I'd like some sort of automation. Next year is a Leap Year and I'd like the calendar I am building to know that.)

Thanks

Hi,

Try the following formula

=DAY(DATE(YEAR(A1),MONTH(A1)+1,1)-1)
 
Upvote 0
I know this is an old thread. But still, here is something very short and simple:

=day(eomonth(A1,0))
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top