+ Reply to Thread
Results 1 to 29 of 29

Bank account balance for each account in one table

  1. #1
    Registered User
    Join Date
    12-01-2022
    Location
    Slovenia
    MS-Off Ver
    2016, 365
    Posts
    12

    Bank account balance for each account in one table

    I'm preparing one single table for multiple bank accounts. The table will be basic for pivot analysis, reports, etc...

    The problem I have is that I would like to get new account balance at every new income/cost for each name (new rows, etc...) in one table. Because during the year the table will sure become huge (at least 3.000 rows), I need a solution as simple as possible to avoid excel being slow. I know how to make multiple tables for each account, but that means excel will become slow for sure...

    Any simple ideas?sample.xlsx

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: Bank account balance for each account in one table

    Here is power query solution to achieve ending balances

    Please Login or Register  to view this content.
    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Bank account balance for each account in one table

    =SUM([@income],-[@outcome],IFERROR(INDEX(F:F,AGGREGATE(14,6,ROW($C$4:$C13)/($C$4:$C13=[@Name]),1)),0))
    Attached Files Attached Files
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  4. #4
    Registered User
    Join Date
    12-01-2022
    Location
    Slovenia
    MS-Off Ver
    2016, 365
    Posts
    12

    Re: Bank account balance for each account in one table

    Thanks both for ideas! Perfect!

    What about excel speed after table will get bigger and bigger? Perhaps bsalv's solution can be a little bit more simple, therefore excel can handle it a little bit easier?

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: Bank account balance for each account in one table

    The Power Query function is very fast and can handle up to millions of rows very quickly. Once set up, it calculates changes by selecting Refresh All.

  6. #6
    Registered User
    Join Date
    12-01-2022
    Location
    Slovenia
    MS-Off Ver
    2016, 365
    Posts
    12

    Re: Bank account balance for each account in one table

    Alan thanks for info.
    I'll read stuff you wrote and try to learn as much as possible about PQ.

  7. #7
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Bank account balance for each account in one table

    indeed with 4.000 rows, there is a small delay.
    if you change the recalculation to manual and then work with F9, that's the same as the refresh in PQ.
    Another possibility is, with 4.000 rows/cells, copy the first 3.990 rows and paste them as values. Normally, these values 'll not change and therefore it's no problem to replace the formulas in those rows.

  8. #8
    Registered User
    Join Date
    12-01-2022
    Location
    Slovenia
    MS-Off Ver
    2016, 365
    Posts
    12

    Re: Bank account balance for each account in one table

    bsalv, one more question if I may...

    ...when I add one column on the left side, formatted as date, everything still works fine, but when I add another date row by pressing ctrl+d, excel returns there is problem with circular reference error.
    As I googled, this is maybe a problem with aaggregate function number (14,6). The only solution is to manually extend table for another row, without ctrl+d. But that does bother me...

    I plan to add some more columns on the right, so there will sure be more problem and not only with date column...
    What would you do?
    Last edited by TomazJ; 12-02-2022 at 02:38 PM.

  9. #9
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Bank account balance for each account in one table

    i modified the formula (added some absolute addresses, included the actual row and, of course, used the 2nd largest row.
    You didn't use a table, so i omitted that, because i'm not sure that works okay with CTRL+d
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: Bank account balance for each account in one table

    In the attached I added a couple of new actions for Robin and then clicked on Refresh All. The data in my result table automatically updates. No need to change any coding with PQ
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    01-20-2020
    Location
    Gridley, ILL
    MS-Off Ver
    2021
    Posts
    28

    Re: Bank account balance for each account in one table

    Change you range into a table.
    In the account balance column enter: =SUMPRODUCT(([Name]=[@Name])*([income]-[outcome])) and copy down.
    This will give an account balance for each person at each data entry.

  12. #12
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Bank account balance for each account in one table

    Use SUMIF or SUMIFS, F5=SUMIF(C$5:C5,C5,D$5:D5)-SUMIF(C$5:C5,C5,E$5:E5), copy down.

  13. #13
    Registered User
    Join Date
    12-01-2022
    Location
    Slovenia
    MS-Off Ver
    2016, 365
    Posts
    12

    Re: Bank account balance for each account in one table

    mgramm
    josephteh

    I find your solutions perfect for seperate table, where daily account balance (for example if I need a table to check if balance is the same as shown at ATMs or web bank apps). But in basic table I can't see account balance what is needed for charts etc... Still working on solution how to use ctrl+d, but so far still nowhere...

    Well in case I fail, I most likely will have to use bsalv's or alansidman's solution (late I still don't understand completely, but I work on that.

    Anyway - you guys rock!

  14. #14
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Bank account balance for each account in one table

    with the formula of Josephteh, i have no problems with CTRL+d, do you ?
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    12-01-2022
    Location
    Slovenia
    MS-Off Ver
    2016, 365
    Posts
    12

    Re: Bank account balance for each account in one table

    You're right. Looks like it works. I have no idea what was wrong with my previous try..
    ..I'm gonna fill table with some old data, prety sure everything will be just fine. If not, I'll take a break out there in nature..


    But I wonder if someone before me (of course, I'm the new guy here) had same question... Forum checked, but found nothing. How do you guys build a table for this kind of stuff (or Am I the only one, he he..)??

    I'll be back...

    EDIT:
    No luck. Still changes balance at every new row.sample_1.xlsx

    For Mary, column "I" is what I need.
    Agrhhh.
    Last edited by TomazJ; 12-03-2022 at 07:06 AM.

  16. #16
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Bank account balance for each account in one table

    The formula should be =SUMIF($C$5:$C5,$C5,$D$5:$D5)-SUMIF($C$5:$C5,$C5,$E$5:$E5)
    or =SUMIF(C$5:C5,C5,D$5:D5)-SUMIF(C$5:C5,C5,E$5:E5)

  17. #17
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Bank account balance for each account in one table

    i prefer to include the headerrow, because one can (probability ???)always insert a new first row ...
    Please Login or Register  to view this content.
    Attached Files Attached Files

  18. #18
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Bank account balance for each account in one table

    Good thinking, bsalv!

  19. #19
    Registered User
    Join Date
    01-20-2020
    Location
    Gridley, ILL
    MS-Off Ver
    2021
    Posts
    28

    Re: Bank account balance for each account in one table

    Try the table in the attached sheet. Keeps a total account balance with individual balances at top of sheet
    Attached Files Attached Files

  20. #20
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Bank account balance for each account in one table

    Good use of excel table structured cell references for cumulative sum total, mgramm!

  21. #21
    Registered User
    Join Date
    12-01-2022
    Location
    Slovenia
    MS-Off Ver
    2016, 365
    Posts
    12

    Re: Bank account balance for each account in one table

    Well, somehow I managed to do something..
    ..the table shows balance as I wanted, I'm just confused if my solution will make my table slow after 2.000 rows...

    But still, I can simply delete formulas later. For analyse I don't need them anyway...sample_02.xlsx

  22. #22
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Bank account balance for each account in one table

    Don't refer to whole columns in your formula, it will slow down the workbook. Change E3=IF(F3="starting balance","",SUMIF(B$2:B3,B3,C$2:C3)-SUMIF(B$2:B3,B3,D$2:D3)).
    Attached Files Attached Files

  23. #23
    Registered User
    Join Date
    12-01-2022
    Location
    Slovenia
    MS-Off Ver
    2016, 365
    Posts
    12

    Re: Bank account balance for each account in one table

    Josephteh, thank you.

    But if I add for example two rows as Paula, two times income 50€, then both new balances will be the same 170€ instead 120€ and 170€... and I don't want that.
    And yes, I'm affraid my solution can cause poor table speed...

    EDIT: Strange. It worked just fine when i copied down F3 one more time... Why is that so?
    Last edited by TomazJ; 12-04-2022 at 08:15 AM.

  24. #24
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Bank account balance for each account in one table

    No idea what you have done...

  25. #25
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Bank account balance for each account in one table

    can you add your problem-workbook here as attachment ?

  26. #26
    Registered User
    Join Date
    12-01-2022
    Location
    Slovenia
    MS-Off Ver
    2016, 365
    Posts
    12

    Re: Bank account balance for each account in one table

    sample_03.xlsx

    I only added two rows, starting with ctrl+d in Column A.
    As result I get two rows with balance +160€ instead one with +60 and another with +160€.

    But when I once more copy E3 down, I get row15 -20€, row16 +60€ and row17 +160€.

    What Am I doing wrong?

  27. #27
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,544

    Re: Bank account balance for each account in one table

    Try the following:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  28. #28
    Registered User
    Join Date
    12-01-2022
    Location
    Slovenia
    MS-Off Ver
    2016, 365
    Posts
    12

    Re: Bank account balance for each account in one table

    Quote Originally Posted by JeteMc View Post
    Try the following:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    JeteMc, thanks, looks like this works just fine.
    Hopefully it won't slow down table. Now I can continue with pivot tables.

    Thanks to all of you for helping me!
    Cheers!

  29. #29
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,544

    Re: Bank account balance for each account in one table

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. Running balance with multiple bank account transactions in one table
    By bcarruthjr in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2021, 03:16 PM
  2. Replies: 4
    Last Post: 01-30-2020, 07:00 AM
  3. How do I create a rolling bank account balance?
    By Dubby20 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-16-2013, 09:08 AM
  4. Replies: 3
    Last Post: 01-04-2013, 03:45 PM
  5. bank account balance
    By kc27315 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-08-2008, 02:48 PM
  6. [SOLVED] automatic entering Balance at every entry in my bank account
    By Sena in forum Excel General
    Replies: 2
    Last Post: 08-10-2005, 01:05 PM
  7. What is the formula for bank account row balance column
    By Hazeldean in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-17-2005, 12:06 AM

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