Automating B2B Invoice Matching in Excel: A Practical Macro Solution for Tax Professionals Introduction
As a tax consultant, I often encounter the challenge of reconciling B2B transactions and matching invoice-wise details for GST or income tax compliance. To simplify this repetitive and error-prone process, I have developed an Excel macro tool that automates the matching of B2B invoices with corresponding details. I am sharing this solution with the TaxGuru.in community in the hope that it may help fellow professionals streamline their workflow and reduce manual errors.
How My Excel Macro Works
The macro-enabled Excel sheet is designed to:
- Automatically match B2B invoices: The tool compares invoice numbers and values between your records and the data downloaded from the GST portal or your accounting software.
- Highlight mismatches: Any discrepancies are flagged for easy review, allowing you to quickly identify missing or mismatched invoices.
- Generate summary reports: The macro can produce a summary of matched, unmatched, and partially matched invoices for compliance reporting.
- Invoice-wise processing: Each invoice is checked individually, ensuring a detailed, line-by-line reconciliation.
Example of Macro Logic:
Suppose you have your invoice data in Sheet1 and portal data in Sheet2. The macro loops through each invoice number in your records, searches for a match in the portal data, and marks the result in a new column. This process can be customized for different formats and requirements.



If the Party has two invoices for the same amount, one invoice return has been filed one invoice return has not been filed. Your software reconciled it with a single invoice.
Something’s wrong, matching wrong, how can I tell you?
GSTN NUMBER INVOICE DATE INVOICE NUMBER PARTY NAME INVOICE TYPE TAXABLE VALUE CGST SGST IGST CESS TOTAL Status Reason Source
07AABCP1585N1Z1 01-04-2025 GST/DEL/01 ABC Pvt Ltd Regular 15,000.00 1,350.00 1,350.00 17,700.00 Matched Perfect Match 2B
07AABCP1585N1Z1 01-04-2025 GST/DEL/01 ABC Pvt Ltd 15,000.00 1,350.00 1,350.00 17,700.00 Matched Books
07AABCP1585N1Z1 02-04-2025 GST/DEL/02 ABC Pvt Ltd Regular 1,75,000.00 15,750.00 15,750.00 2,06,500.00 Matched Perfect Match 2B
07AABCP1585N1Z1 02-04-2025 GST/DEL/02 ABC Pvt Ltd 1,75,000.00 15,750.00 15,750.00 2,06,500.00 Matched Books
07AABCP1585N1Z1 03-04-2025 PPL/03 ABC Pvt Ltd Regular 15,000.00 1,350.00 1,350.00 17,700.00 Matched Perfect Match 2B
07AABCP1585N1Z1 01-04-2025 GST/DEL/01 ABC Pvt Ltd 15,000.00 1,350.00 1,350.00 17,700.00 Matched Books
07AABCP1585N1Z1 04-04-2025 PPL/04 ABC Pvt Ltd Regular 1,75,000.00 15,750.00 15,750.00 2,06,500.00 Matched Perfect Match 2B
07AABCP1585N1Z1 02-04-2025 GST/DEL/02 ABC Pvt Ltd 1,75,000.00 15,750.00 15,750.00 2,06,500.00 Matched Books Wrong
07AABCP1585N1Z1 04-04-2025 PPL/04 ABC Pvt Ltd 2,00,000.00 18,000.00 18,000.00 2,36,000.00 Unmatched Not found in 2B Books
Unable to download the automated B2B matching Excel Tool.
Kindly login and Download