+ Reply to Thread
Results 1 to 2 of 2

Excel VBA Payment Reconciliation

  1. #1
    Registered User
    Join Date
    04-26-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 Apps for Business (v 2306 / 16.0) 64-bit
    Posts
    27

    Question Excel VBA Payment Reconciliation

    This is probably too complicated and beyond the scope of this forum, but I figured I'd give it a shot anyway. I won't be (too) offended if you tell me to screw off .

    Anyways, I am attempting to create a report that reconciles a Customer's payment against a list of their open invoices. Most customers are helpful and email us a copy of their remittance advice with their ACH or Wire payments that explains the exact breakdown of their payment. Others, not so much.

    Currently this is a multi-step process where I've already done the prep work of everything up to the reconciliation portion.
    1. User enters a Customer Number into a named range on the worksheet
    2. This triggers a worksheet event that performs a simple ADODB SQL Update into an MS Access database. It just updates a micro table with a single field and single record so another query can perform a LEFT JOIN against it (since Excel's Power Query is incapable of passing parameters to Access - what a shame).
    3. The same event then refreshes/updates a Power Query that is linked to the same Access DB. The query in Access is connected to our ERP database via an ODBC connection. It returns a complete list of every open invoice (based on Balance<>0) for the provided customer number that we just updated the micro table in Access with.
    4. The Power Query is loaded to the worksheet as 'OpenInvoiceLookup' and the ListObject's name is the same.

    Now here's the fun part that is well beyond my capabilities.

    First of all, understand that not all customers are created equal - and this translates to much additional complexity.
    The goal is for the user to be able to enter the payment amount into another named range in Excel that would trigger another workbook change event. This is where I would need to start matching potential invoices against the customer's payment.

    Here's a sample of what the table would look like:
    Attachment 854736

    Now the part where I said not all customers are created equal...
    Most customers pay the balance due.
    There are some who short-pay because they're tax exempt and haven't sent in their tax exemption to us or failed to input the freight amount into their system.
    Then there are some customers who pay early and take their prompt-Pay discount. Then there are some customers who pay late and still take their prompt-pay discount.
    And finally we have customers who can be any of these combinations of things.

    Note: The discount isn't included in the customer's balance due. Some customers who pay within their discount period also do not always take their discount.

    Essentially I am looking for a method to figure out what the customer may have paid down to the penny. For each record they could have paid:
    • The [Balance] (most likely)
    • The [Balance] - [DiscountAmt]
    • The [Balance] - [SalesTaxAmt]
    • The [Balance] - [FreightAmt]
    • The [Balance] - [SalesTaxAmt] - [DiscountAmt]
    • The [Balance] - [FreightAmt] - [DiscountAmt]
    • There are technically a few more combinations, but those would be the least likely and far edge cases.

    It would be nice to perform a check on just the Balance first as these are the most common, then to perhaps take a wide view of the other possibilities.

    Also if it is helpful for me to load the table data in a different way, I can modify the linked Access Query to output data however it's beneficial (for example, if it would be helpful for me to include columns for [BalanceLessDisc] and [BalanceLessTax], etc) then I am all for it.

    Also noted: I wouldn't mind a Power Query or VBA solution, although while knowing PQ is pretty powerful in transforming data I can't even be certain if it's up for the task of this complexity but I would love to see the inter-workings of the involved steps if I am wrong.



    I sincerely appreciate the brave souls who are willing to throw some attempts at this.




    I've included 2 workbooks that are identical with the exception of one has the macros from the original and one without.
    The VBA code in the macro-enabled workbook isn't essential to the request and and non-vba workbook can be used, but I went ahead and included both for the sake of why not.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Excel VBA Payment Reconciliation

    Hi! It's not beyond the scope of the forum and it's not too complicated. And we never tell people to screw off just for asking a question But it's a really big question and that is probably why people are not rushing to donate what will end up being several hours of their time to help you. It would take me an hour just to figure what you have done so far and what your question is. Also not everybody knows Power Query. You may want to consider offering payment for this. We have a subforum called Commercial Services for this. I would suggest starting out with something like 30 points, which will cost you 30 USD. The person who solves it will get 75% of that.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel help for Reconciliation
    By mariothefool in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-27-2020, 09:35 AM
  2. Replies: 1
    Last Post: 02-04-2016, 01:03 PM
  3. Inter-company reconciliation with excel
    By ange88 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-09-2015, 11:49 PM
  4. bank reconciliation using excel
    By Rajat goel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2013, 06:21 AM
  5. [SOLVED] How would you do a bank reconciliation in excel.
    By Sim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-20-2013, 10:47 PM
  6. Excel Macro Reconciliation
    By gignz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-16-2012, 08:27 AM
  7. Want to use Excel for account reconciliation
    By mceloise in forum Excel General
    Replies: 5
    Last Post: 01-04-2012, 12:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1