Last day of the month with EOMONTH
PremiumIn B2, use EOMONTH to find the last day of the month of the invoice date in A2.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Invoice date | Month end | ||||
| 2 | Mar 15, 2024 | |||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 |
Premium lesson
Unlock EDATE and EOMONTH and every other lesson
This is a premium lesson. Premium lets you solve it and every other lesson, take the timed mock tests, and earn certificates you can share on LinkedIn.
Next with premium:NETWORKDAYS, WORKDAY and WEEKDAYDATEDIF
It comes up in this mock test: Excel test for accounting and bookkeeping
Need help?
Why this works
EOMONTH(A2,0) returns the last day of the month A2 is in: Mar 31, 2024. The second argument moves that many months first, so EOMONTH(A2,1) is Apr 30, 2024 and EOMONTH(A2,-1) is Feb 29, 2024.
Common mistake: Leaving out the second argument. EOMONTH needs both, so =EOMONTH(A2) is not accepted.
The answer
- B2
=EOMONTH(1A2,20)
In plain words: The last day of 2the same month as 1the invoice date in A2.
=EOMONTH(A2,0) returns the last day of the month A2 is in.