Case 1: accounts receivable aging report

At month end, management wants to know which customers are behind and by how much. You build the open items list from invoices, payments received and the customer master, then age the balances into buckets.

In short: fetch the customer and invoice date with XLOOKUP by invoice number, take the open amount as the invoice amount minus SUMIF over all payments, and the due date as invoice date plus payment terms. For the buckets, XLOOKUP with match mode -1 finds the right lower bound. The basic days-overdue formula is on the page Excel for accounting.

The situation

It is Monday 2 Nov 2026. The owner of a small building supplies wholesaler wants an aged list of open receivables as of 31 Oct 2026 by Wednesday. He plans to decide who gets a reminder and whether one customer should get shorter terms. The accounting system gives you three exports: sales invoices, payments received on the bank account, and the customer master with agreed payment terms.

The workbook sheet by sheet

  • Invoices: invoice number, customer number, amount and invoice date, sorted by number.
  • Payments: bank reference, the invoice number from the payment reference, amount and date. Some customers pay in instalments, so one invoice can appear more than once.
  • Customers: customer number, name and payment terms in days, between 14 and 60 depending on the customer.
  • OpenItems: the list you build. The invoice numbers are already there, in a different order than the export.
  • Buckets (task 2): the aging buckets with their lower bound in days.

Task 1: open amount and due date

Task Build the open items list for month end. The OpenItems sheet lists the invoice numbers. B2: the customer number from the Invoices sheet. C2: the amount still open, that is the invoice amount minus every payment for that invoice on the Payments sheet (some customers pay in instalments). D2: the due date, invoice date plus the customer's payment terms from the Customers sheet. Each formula is filled down to row 10.

ABCDE
1 Invoice Customer Open Due date
2 R-2026-312
3 R-2026-327
4 R-2026-288
5 R-2026-336
6 R-2026-301
7 R-2026-318
8 R-2026-331
9 R-2026-305
10 R-2026-322
11
12

Step 1: customer for each invoice

B2 fetches the customer number: =XLOOKUP(A2,Invoices!$A$2:$A$10,Invoices!$B$2:$B$10). The ranges are absolute because the formula is filled down to row 10; A2 stays relative so each row looks up its own invoice. A fixed reference such as =Invoices!B5 only works until the next export comes sorted differently. The lesson on XLOOKUP has the details.

Step 2: open amount with part payments

A lookup on the payments would only find the first instalment. SUMIF adds up every payment for that invoice and returns 0 if nothing has come in yet. So C2 is =XLOOKUP(A2,Invoices!$A$2:$A$10,Invoices!$C$2:$C$10)-SUMIF(Payments!$B$2:$B$7,A2,Payments!$C$2:$C$7). For R-2026-312 at 8,330.00 two instalments come together and 2,330.00 remains open.

Step 3: due date from the terms

Terms belong to the customer, not to the invoice, so D2 chains two lookups: =XLOOKUP(A2,Invoices!$A$2:$A$10,Invoices!$D$2:$D$10)+XLOOKUP(B2,Customers!$A$2:$A$5,Customers!$C$2:$C$5). The second one uses the customer number you just calculated in B2. A date plus a number is a date again, because Excel stores dates as day counts.

Task 2: aging as of the cut-off date

Task The open items list is ready; now add the aging as of the date in H1. E2: how many days the invoice is overdue on that date; paid invoices and invoices not yet due get 0. F2: "paid" if nothing is open, otherwise the age bucket from the Buckets sheet. E2 and F2 are filled down to row 10. H4: the open amount of the bucket in G4, filled down to H8. H10: overdue amounts as a share of all open items (as a decimal).

ABCDEFGHI
1 Invoice Customer Open Due date Days overdue Age bucket As of 31 Oct 2026
2 R-2026-312 K-104 2330 26 Sep 2026
3 R-2026-327 K-101 0 15 Oct 2026 Age bucket Open
4 R-2026-288 K-103 1428 27 Jul 2026 not due
5 R-2026-336 K-103 6545 4 Dec 2026 1-30 days
6 R-2026-301 K-102 0 2 Sep 2026 31-60 days
7 R-2026-318 K-103 1475 19 Oct 2026 61-90 days
8 R-2026-331 K-104 1785 8 Dec 2026 over 90 days
9 R-2026-305 K-101 0 31 Aug 2026
10 R-2026-322 K-102 595 15 Oct 2026 Share overdue
11
12

This exercise is part of Premium.

Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.

See Premium Already Premium? Log in

The first exercise in this lesson is free.

Step 4: days past due

E2 is the as-of date minus the due date, never negative, and 0 for paid invoices: =IF(C2=0,0,MAX(0,$H$1-D2)). The date in H1 is absolute so it stays put when you fill down.

Step 5: bucket from a table

Instead of four nested IFs, the buckets live on their own sheet with lower bounds of 0, 1, 31, 61 and 91 days. =IF(C2=0,"paid",XLOOKUP(E2,Buckets!$A$2:$A$6,Buckets!$B$2:$B$6,,-1)) takes the largest lower bound that is less than or equal to the days. 35 days goes to 31, the 31-60 days bucket. The two commas leave the "if not found" argument empty. If the finance director prefers other limits, you only change the Buckets sheet.

Step 6: totals by bucket and share overdue

H4 totals each bucket: =SUMIF($F$2:$F$10,G4,$C$2:$C$10), filled down to H8. H10 divides the overdue buckets by all open items: =SUM(H5:H8)/SUM(C2:C10). Formatted as a percentage it shows about 41%.

Common mistakes

Looking up part payments

VLOOKUP and XLOOKUP return the first match only. With instalments the open amount comes out too high, and nothing looks wrong. Use SUMIF or SUMIFS for payments.

Negative days

Without MAX, an invoice that is not yet due gets negative days, and XLOOKUP finds no lower bound and returns #N/A.

Paid invoices in "not due"

A paid invoice has 0 days, so without the C2=0 check it lands in "not due". The bucket total is still right because the amount is 0, but the list says something untrue.

How to check your result

  • The open amounts in C2:C10 add up to 14,158.00, which is all invoices (31,178.00) minus all payments (17,020.00).
  • R-2026-288 from 12 Jun 2026 with 45-day terms was due on 27 Jul 2026 and is 96 days past due on the cut-off date.
  • The buckets in H4:H8 add up to 14,158.00 again; 5,828.00 of it is overdue.

The functions in German Excel

XLOOKUP is XVERWEIS, SUMIF is SUMMEWENN, IF is WENN, MAX stays MAX and SUM is SUMME. German Excel separates arguments with semicolons: =WENN(C2=0;"bezahlt";XVERWEIS(E2;Klassen!$A$2:$A$6;Klassen!$B$2:$B$6;;-1)).

Excel versions

XLOOKUP is available in Microsoft 365, Excel 2021, Excel 2024 and Excel for the web, but not in Excel 2019 or 2016. There, use VLOOKUP(A2,Invoices!$A$2:$D$10,2,FALSE) for steps 1 to 3 and an approximate-match VLOOKUP for the bucket: VLOOKUP(E2,Buckets!$A$2:$B$6,2,TRUE), with the lower bounds sorted ascending. SUMIF, IF and MAX work in every version.

Frequently asked questions

Why keep the buckets in a separate table?

Because the limits change. Some teams age by 1-15, 16-30 and over 30 days, others by 30, 60 and 90. With a table you change the report without touching a formula.

Can I show the aging per customer?

Yes, with SUMIFS and two criteria, bucket and customer number. Or put the list into a PivotTable with customers in rows and buckets in columns.

Next: case 2, bank reconciliation

Match the bank statement against the ledger and classify every difference.

Start case 2

Write to us

Choose language

Select your preferred language