+ Reply to Thread
Results 1 to 2 of 2

Need Help for VBA code to sort transactions

  1. #1
    Registered User
    Join Date
    01-22-2021
    Location
    Trinidad
    MS-Off Ver
    D365
    Posts
    11

    Need Help for VBA code to sort transactions

    I have a data set and I need to apply payments to balances,
    Attached is a sample
    Sheet 1 is the transactions
    Sheet 2 is opening payments
    Sheet 3 is expected results

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Need Help for VBA code to sort transactions

    There is no need to use VBA to accomplish this tasks. Excel tables and formulas will do.

    Excel tables have a lot of benefits. One of them is that they know how big they are so when you write formulas using them, they always reference the right amount of rows even when you add or delete rows. When you add data to the row immediately below the table, that row becomes part of the table. Furthermore, all the formulas, validations and formats get copied down to that row.

    So I took some liberties with the transactions table. I moved the date to the first position, since it is easy to enter the date manually. This copies down the validations for the rest of the columns. There is a Tables Tab where you can add Trans Codes and Data SRC. These tables provide data validation for columns C and E in the transactions table. You can either type these values in or use the drop-down list in the cell. Column B is validated from column A in the Balance Table

    I also formatted the amount to currency.

    The balance sheet shows the current worth of the accounts. Column B contains the Opening Balance - I put some test values in there. Column C has the formula to summarize the transactions.
    =[@[Opening Balance]]+SUMIFS(Table_Transactions[AMT],Table_Transactions[ACCT_ID],[@[ACCT_ID]])

    Now you see another advantage of tables, formulas are expressed in terms of table names and column headers. This makes them easier to understand.

    If you need a new account, just add it to the Balance Table.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. Need a VBA code to net off transactions
    By jason6969 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-13-2022, 08:33 AM
  2. sort my montly bank transactions in Excel: Please help!
    By Deicide5997 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-25-2015, 07:05 AM
  3. Replies: 22
    Last Post: 09-20-2013, 02:00 PM
  4. Replies: 2
    Last Post: 09-17-2013, 07:12 PM
  5. How to pull transactions into a template based on a customer code?
    By The_Snook in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2013, 03:34 PM
  6. Sort by Stock Name then list by Oppsite Transactions
    By SMJE in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-19-2011, 06:57 PM

Tags for this Thread

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