DAY of the month's last day is its length.
Monthly rent is split by days occupied, so you need each month's length. In B2:B6 give the number of days in the month of each date.
Solve it on your own to keep the bonus. Each hint gets one step closer to the formula.
The same formula in the other shapes it takes at work.
Find the last day of the month using EOMONTH.
The end of last month plus one day.
A positive offset moves forward by whole months.
DAY of the month's last day is its length.
This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.
| A | B | |
|---|---|---|
| 1 | Date | Days in month |
| 2 | 2/10/2024 | |
| 3 | 2/10/2025 | |
| 4 | 4/30/2024 | |
| 5 | 7/4/2024 | |
| 6 | 9/1/2024 |
The last day's number is the month's length, leap years included, so there is no table of month lengths to maintain. February 2024 gives 29 and February 2025 gives 28 from the same formula.