+ Reply to Thread
Results 1 to 4 of 4

dynamic expansion of formula ranges

  1. #1
    Registered User
    Join Date
    05-21-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    39

    dynamic expansion of formula ranges

    Hi everyone!

    I've come accross a slight problem for my cashflow.
    In essence it seems simple but the answer has been avoiding me now for days... It's as follows:
    I have a sum of the total income (say A6=Sum(A1:A5)) which can increase or decrease depending on the object evaluated.
    So the problem arises when I insert a row at the end, A7 will still only calculate Sum(A1:A5) and A6 (new value) has to be added manually.
    It wouldn't be a problem if it needed to change once in a while but its an almost daily activity example below:

    A1 : 1
    A2 : 2
    A3 : 3
    A4 : 4
    A5 : 5
    A6 : 15 (total)

    Range increase:

    A1 : 1
    A2 : 2
    A3 : 3
    A4 : 4
    A5 : 5
    A6 : 6
    A7 : 21 (total)

    Any help would be much appreciated!

    Kurifodo

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: dynamic expansion of formula ranges

    Insert a new blank row or two at the top of the sheet and put your total formula there (in the new A1). Then you can have the range much larger than you really need to accommodate extra entries, eg:

    =SUM(A2:A2000)

    Hope this helps.

    Pete

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: dynamic expansion of formula ranges

    could you put the new row in btw 4 and 5, instead of 5 and 6?
    or leave a blank row btw 5 and 6, make your sum() incude the blank row, and insert new rows above the blank row?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    05-21-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: dynamic expansion of formula ranges

    Putting the new row in between did do the trick indeed! It truly is the case that the simple answer is the one escaping you!


    Thanks a lot for the help / brain storm

    Kurifod

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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