Month-end cut-off: practice exercises
The first day of next month with EOMONTH, payments in a month with >= and <, totals ready for rows still to come, DATE from a year and month, duplicates or genuine second payments. 5 exercises on real-looking data, each marked the moment you press Check. The first exercise is below to try now; the full lesson is part of Pro.
The month starts on the date in H1. In H2, work out the date the next month starts, with EOMONTH, so it works for a month of any length.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Paid at | Supplier | Amount | Reference | Month starts | 01/01/2026 | ||
| 2 | 29/12/2025 14:47 | Lakeside Fuel | £2,260.31 | PAY-7300 | Next month starts | |||
| 3 | 31/12/2025 23:59 | Brightway Office Supplies | £1,753.64 | PAY-7301 | ||||
| 4 | 01/01/2026 00:00 | Ironbridge Insurance | £2,392.10 | PAY-7302 | ||||
| 5 | 11/01/2026 08:54 | Brightway Office Supplies | £1,695.89 | PAY-7303 | ||||
| 6 | 11/01/2026 11:42 | Lakeside Fuel | £583.05 | PAY-7304 | ||||
| 7 | 16/01/2026 07:06 | Greystone IT | £2,060.50 | PAY-7305 | ||||
| 8 | 20/01/2026 07:23 | Lakeside Fuel | £157.37 | PAY-7306 | ||||
| 9 | 22/01/2026 07:26 | Greystone IT | £1,251.01 | PAY-7307 | ||||
| 10 | 29/01/2026 14:42 | Greystone IT | £468.65 | PAY-7308 | ||||
| 11 | 31/01/2026 23:19 | Dalton Freight | £1,682.16 | PAY-7309 | ||||
| 12 | 31/01/2026 23:59 | Dalton Freight | £954.76 | PAY-7310 | ||||
| 13 | 01/02/2026 00:00 | Lakeside Fuel | £2,335.11 | PAY-7311 |
How it works
At the month end, every payment and receipt has to land in the right month: that's cut-off. Bank exports give the date and time, so a payment at 23:59 on 31 October is a number just under 1 November. <=31/10/2026 means up to midnight at the start of the 31st, which leaves out everything later that day.
The safe pair of tests is on or after the 1st and before the 1st of next month: ">="&start and "<"&next. EOMONTH(date, 0) gives the last day of the month, and one day more is the 1st of the next.
=EOMONTH(E1,0)+1 =EOMONTH(A3,0) =SUMIFS(B2:B40,A2:A40,">="&E1,A2:A40,"<"&E2) =COUNTIFS(A2:A40,">="&DATE(E1,E2,1),A2:A40,"<"&DATE(E1,E2+1,1)) =IF(COUNTIFS($A$2:$A$40,A2,$B$2:$B$40,B2,$C$2:$C$40,C2)>1,"Check","")
Dates with times
Excel stores a date as a whole number of days, and a time as part of a day: 12:00 is 0.5. So 31/10/2026 23:59 is a number just under 1 November, and 31/10/2026 on its own means midnight at the start of the 31st.
That's why "<="&EOMONTH(start,0) loses payments made later on the last day. Use two tests: on or after the 1st of the month, and before the 1st of the next. EOMONTH(date,0) is the last day of the month, so EOMONTH(date,0)+1 is the 1st of the next, whatever the month's length. EOMONTH(A2,0) on a payment also tells you which month end it belongs to.
Worked example
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Paid at | Amount | Month starts | 01/10/2026 | |
| 2 | 30/09/2026 23:59 | £100.00 | Next month starts | 01/11/2026 | |
| 3 | 01/10/2026 00:00 | £250.00 | Paid in October | ||
| 4 | 14/10/2026 10:30 | £75.00 | Missing the 31st | ||
| 5 | 31/10/2026 23:59 | £40.00 | |||
| 6 | 01/11/2026 00:00 | £60.00 |
=EOMONTH(E1,0)+1in E2. The last day of October is the 31st, and one more day is 01/11/2026.=SUMIFS(B2:B7,A2:A7,">="&E1,A2:A7,"<"&E2)in E3. On or after 1 October and before 1 November: £250 + £75 + £40 = £365. The 23:59 payment on the 31st counts, and the one at 00:00 on 1 November doesn't.=SUMIFS(B2:B7,A2:A7,">="&E1,A2:A7,"<="&EOMONTH(E1,0))in E4. With <= the last day, the total is £325: the £40 paid at 23:59 on the 31st falls outside, because it's after midnight at the start of that day.
Ready for the rest of the month
A payments log fills up through the month. Make the ranges run to the bottom of the space you've left, such as row 30, so a payment typed in on the 29th is counted without anyone touching the formula.
A report that picks a month by its year and month number can build the dates with DATE: DATE(H1,H2,1) is the 1st of the month and DATE(H1,H2+1,1) the 1st of the next. Month 13 rolls on to January of the next year, so December works too.
Duplicate or second payment?
Two payments to the same supplier for the same amount could be a mistake, or a genuine second payment, such as this month's and next month's rent. The invoice number tells them apart. COUNTIFS with three pairs (supplier, amount and invoice number) only counts rows that match on all three, so =IF(COUNTIFS(supplier,B2,amount,C2,invoice,D2)>1,"Check","") flags the true duplicates and leaves the second rent payment alone.
A different supplier can use the same invoice number too, which is why the supplier is one of the pairs.
What you'll practise
- The month starts on the date in H1. In H2, work out the date the next month starts, with EOMONTH, so it works for a month of any length.
- Each payment goes in the accounts for the month it was made in. In E2, show the last day of that month, the month end it belongs to.
- The payments log has room down to row 30 for payments still to come in. In H3, total the payments made in the month: on or after the date in H1, and before the date in H2. Cover rows 2 to 30 so the total is ready for the rest of the month.
- The report picks a month by its year in H1 and month number in H2. In H3, count the payments made in that month, using DATE to make the first day of the month and the first day of the next.
- Two payments to the same supplier for the same amount might be a mistake, or a genuine second payment for another invoice, such as next month's rent. In E2, show Check if the same supplier, amount and invoice number appear more than once, and leave it blank otherwise.
Guides with worked examples: Accruals and prepayments in Excel: spreading a bill over the months · Bank reconciliation in Excel: matching the cash book to the statement