# Series of months/year and # days for those months

#### Ludovico

##### Board Regular
B6 contains Today() function
A15 should return the month, year of the following month based on today’s date (ie today is August 26, 2002 so A15 would read: “September, 2002”
A16 to return the following month, year (eg “October, 2002) and so on through A134
B15:B134 should return the number of days for the corresponding months in column A, eg B16 would read "31". Needs to recognize leap years (2004, 2008, 2012, 2016, 2020, 2024) and assign 29 days to February in those years.
I tried =DATE(YEAR(\$B\$6),MONTH(EDATE(\$B\$6,k15)),1) in A15 and copied down (column K corresponded to month 1, month 2, and so on), but the results all were 2002 and I wouldn’t have a clue as how to use that approach to get the number of days/month in column B anyway.

Any help will be appreciated.
Ludovico

### Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
On 2002-08-28 07:11, Ludovico wrote:
B6 contains Today() function
A15 should return the month, year of the following month based on today’s date (ie today is August 26, 2002 so A15 would read: “September, 2002”
A16 to return the following month, year (eg “October, 2002) and so on through A134
B15:B134 should return the number of days for the corresponding months in column A, eg B16 would read "31". Needs to recognize leap years (2004, 2008, 2012, 2016, 2020, 2024) and assign 29 days to February in those years.
I tried =DATE(YEAR(\$B\$6),MONTH(EDATE(\$B\$6,k15)),1) in A15 and copied down (column K corresponded to month 1, month 2, and so on), but the results all were 2002 and I wouldn’t have a clue as how to use that approach to get the number of days/month in column B anyway.

Any help will be appreciated.
Ludovico

In A15 enter & copy down:

=DATE(YEAR(\$B\$6),MONTH(\$B\$6)+ROW(1:1),1)

Alternatively:

=EDATE(\$B\$6,ROW(1:1))-DAY(\$B\$6)+1

In B15 enter & copy down:

=DAY(EOMONTH(A15,0))

Perfect; thanks much.
Somehow I thought it would be you helping me on this one.
Hope things are well across the Atlantic.
Dwight

Replies
10
Views
552
Replies
4
Views
407
Replies
3
Views
215
Replies
3
Views
476
Replies
3
Views
375

1,221,423
Messages
6,159,819
Members
451,591
Latest member
j0eyjedi

### 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.

### Which adblocker are you using?

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

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