Confident CellsExcel practice Start free

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.

Your turn

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.

ABCDEFGH
1Paid atSupplierAmountReferenceMonth starts01/01/2026
229/12/2025 14:47Lakeside Fuel£2,260.31PAY-7300Next month starts
331/12/2025 23:59Brightway Office Supplies£1,753.64PAY-7301
401/01/2026 00:00Ironbridge Insurance£2,392.10PAY-7302
511/01/2026 08:54Brightway Office Supplies£1,695.89PAY-7303
611/01/2026 11:42Lakeside Fuel£583.05PAY-7304
716/01/2026 07:06Greystone IT£2,060.50PAY-7305
820/01/2026 07:23Lakeside Fuel£157.37PAY-7306
922/01/2026 07:26Greystone IT£1,251.01PAY-7307
1029/01/2026 14:42Greystone IT£468.65PAY-7308
1131/01/2026 23:19Dalton Freight£1,682.16PAY-7309
1231/01/2026 23:59Dalton Freight£954.76PAY-7310
1301/02/2026 00:00Lakeside Fuel£2,335.11PAY-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

ABCDE
1Paid atAmountMonth starts01/10/2026
230/09/2026 23:59£100.00Next month starts01/11/2026
301/10/2026 00:00£250.00Paid in October
414/10/2026 10:30£75.00Missing the 31st
531/10/2026 23:59£40.00
601/11/2026 00:00£60.00
  1. =EOMONTH(E1,0)+1 in E2. The last day of October is the 31st, and one more day is 01/11/2026.
  2. =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.
  3. =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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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