+ Reply to Thread
Results 1 to 6 of 6

How to automatically add an extra row and automatically update sum formula

  1. #1
    Forum Contributor
    Join Date
    05-17-2017
    Location
    Tallahassee
    MS-Off Ver
    15.32
    Posts
    206

    How to automatically add an extra row and automatically update sum formula

    Hope you are all having an amazing day. I have an Excel worksheet that keeps track of check payments I am receiving. The format looks like the following

    sender, check #, Amount,
    X, 1, $100,
    Y, 2, $50,
    Total: =sum(C2:C3)

    Once cells A3:C3, the ones that contain sender Y data, are filled out, I want another row automatically inserted under it and the sum function to take in the "Amount" from the new observation as part of its argument. How would I do this? Essentially, my goal is to minimize the amount of mistakes my intern can make. I have had past ones forget to update the sum on multiple occasions. I always use this forum because of the massive amount of knowledge you all have. If you could teach me how to make a button that does this, I'd be so appreciative. Any help would be much appreciated.
    Last edited by EdwardSnowden; 07-21-2018 at 10:37 AM.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to automatically add an extra row and automatically update sum formula

    It would be easier and probably safer to put the total somewhere away from the bottom of the column.

    Inserting a row automatically requires vba.

    Having the total somewhere else (away from column C) only requires a simple formula, =SUM(C:C)

    Moving the total to the top of column C (inserting a row above the headers ) could be done with =SUM(C3:INDEX(C:C,MATCH(1e+100,C:C)))

  3. #3
    Forum Contributor
    Join Date
    05-17-2017
    Location
    Tallahassee
    MS-Off Ver
    15.32
    Posts
    206

    Re: How to automatically add an extra row and automatically update sum formula

    Thanks so much! Can you possibly explain what the 1e+100 means?

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to automatically add an extra row and automatically update sum formula

    It's a big number in scientific notation, in reality it only need to exceed the largest check amount that will ever be entered, so if you never recieve checks for more than 1000, then 10000 would be more than adequate. Using 1e+100 (1 followed by 100 zero's) is a good failsafe to make sure that you never exceed the amount set should there be an extreme exception to the norm.

  5. #5
    Forum Contributor
    Join Date
    05-17-2017
    Location
    Tallahassee
    MS-Off Ver
    15.32
    Posts
    206

    Re: How to automatically add an extra row and automatically update sum formula

    Quote Originally Posted by jason.b75 View Post
    It's a big number in scientific notation, in reality it only need to exceed the largest check amount that will ever be entered, so if you never recieve checks for more than 1000, then 10000 would be more than adequate. Using 1e+100 (1 followed by 100 zero's) is a good failsafe to make sure that you never exceed the amount set should there be an extreme exception to the norm.
    I really am still confused. When I run the index match on its own it just returns the last rows value. If you could break down the formula fully for the layman it would be super appreciated!

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to automatically add an extra row and automatically update sum formula

    When I run the index match on its own it just returns the last rows value.
    That is correct, but in the background INDEX actually returns the address of the cell that contains the value not all functions do this, but INDEX is one that does so we can make use of this.

    For instance if your last entry is in C50 then =INDEX(C:C,MATCH(1e+100,C:C)) will result in =C50 rather than what is in C50, but then it shows the result as if you typed =C50 into the cell.

    Then if you look at the formula where the INDEX function would evaluate to C50, you will see that the final result will be SUM(C3:C50)

    =SUM(C3:INDEX(C:C,MATCH(1e+100,C:C)))

+ 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. Replies: 3
    Last Post: 07-02-2018, 03:50 PM
  2. [SOLVED] How to Have a Formula Automatically Update When Adding
    By EverClever in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-26-2017, 11:26 AM
  3. [SOLVED] Automatically update a formula
    By thedunna in forum Excel General
    Replies: 5
    Last Post: 05-13-2016, 02:40 AM
  4. Automatically insert/update a formula
    By peterkm in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-19-2013, 06:38 PM
  5. Can a formula update automatically ?
    By PW6780 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-29-2012, 02:55 PM
  6. Formula does not update automatically
    By Franziska in forum Excel General
    Replies: 4
    Last Post: 06-28-2010, 08:50 AM
  7. Can I set up the formula to update automatically?
    By pugsly8422 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-23-2005, 01:06 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