Matching transactions using pivot tables [video]

Last week, we learned how to use formulas to reconcile (match) transactions in Excel. Today, lets take a look at even faster and simpler way to do this:

Using Pivot Tables


Here is a short video explaining the technique and why it works. See it below

(or watch it on our youtube channel)

Download Example workbook:

Please click here to download the example workbook & play with it.

Hungry for pivot tables? Grab these juicy stuff:


Thanks to commenters Utkarsh, Heather, Carlos & Kerry for suggesting that we use Pivot Tables for this problem.


Hello Awesome...

My name is Chandoo. Thanks for dropping by. My mission is to make you awesome in Excel & your work. I live in Wellington, New Zealand. When I am not F9ing my formulas, I cycle, cook or play lego with my kids. Know more about me.

I hope you enjoyed this article. Visit Excel for Beginner or Advanced Excel pages to learn more or join my online video class to master Excel.

Thank you and see you around.

Related articles:

Written by Chandoo
Tags: , , , , ,
Home: Chandoo.org Main Page
? Doubt: Ask an Excel Question

5 Responses to “Matching transactions using pivot tables [video]”

  1. Robert Clark says:

    Instructions don't quite work. You suggest:
    "To filter vendors who paid up, select less than and enter 0.01 as value". However, this also picks up those that have overpaid. I would suggest that you would Value Filter using Between -.01 and +.01


  2. Herbert says:

    Hi Chandoo,
    Pivot tables indeed do provide a faster solution.

    Can we further expand on the problem? Generally, you would also want to know which invoices were paid for completely and which are still (partially) outstanding, as you apply interest on the invoice amount starting the day it became overdue. Would you happen to have a solution for that also?

    Looking at your example, let's say the positive amounts for the same vendor in the table (the invoices) all have different dates (the invoice dates) and the negative amounts (the payments) for the same vendor also have different dates (the payment dates). If we assume that all payment amounts are always first applied to the oldest open invoice and if all invoices are due on the 30th day after invoicing, (1)how can we find out which invoices still have not been paid in full, (2)what amount still remains open on the invoice, and (3) how would you suggest to calculate the interest amount on the open invoices.

    3-Apr-14 VENDOR-0012 $(38.91) --> prepayment
    4-Apr-14 VENDOR-0012 $(12.41) --> prepayment
    4-Apr-14 VENDOR-0012 $326.28 --> invoice 1
    5-Apr-14 VENDOR-0012 $843.90 --> invoice 2
    7-Apr-14 VENDOR-0012 $38.91 --> invoice 3
    8-Apr-14 VENDOR-0012 $144.41 --> invoice 4
    5-Apr-14 VENDOR-0012 $(173.70) --> 1st payment
    7-Apr-14 VENDOR-0012 $(25.20) --> 2nd payment
    9-Apr-14 VENDOR-0012 $(105.14) --> 3rd payment
    5-Apr-14 VENDOR-0012 $(75.10) --> 4th payment

    The two prepayments would be applied to the invoice 1, leaving a balance of 274.96. Payment 1 would be applied to the remaining balance on invoice 1, leaving a balance of 101.26. Payment 2 would be applied to the remaining balance of invoice 1, leaving a balance of 76.06. Payment 3 would first be applied to the remaining balance of invoice 1 and then on the balance of invoice 2, leaving a balance of 0.0 on invoice 1 and a balance of 814.82 on invoice 2. Payment 4 would be applied to the remaining balance of invoice 2, leaving a balance of 739.72. Invoices 2 (partially), 3, and 4 would have an open balance as of the last payment date.



  3. Pablo says:

    Hi Chandoo,
    I have similar matching challenges and having the customer ID helps a lot, but in my case I only get the transaction date, which doesn't help a lot since it can cover multiple customers and customers pay in different dates, so how do we resolve those cases?

  4. GraH says:

    Some other solutions for this problem are also explained by Mr Excel and ExcelIsFun in a battle between both. you can google "Mr Excel & excelisfun Trick 156: Find Unmatched Positive & Negative Numbers In A Column". https://www.youtube.com/watch?v=G7OGsg23UOY

  5. Amit Sharma says:

    I have a question
    What if the vendor Reference is not same but i want to match that transaction.Is it possible.

Leave a Reply

« »