+ Reply to Thread
Results 1 to 6 of 6

Automatically expanding cell ranges

  1. #1
    Registered User
    Join Date
    04-05-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    13

    Question Automatically expanding cell ranges

    Hi All,

    I looked for similar items but I couldn't find any. My apologies if this has been answered before.

    The table below has three rows and 7 columns. Row 3 shows cumulative sums of the values in Row 2. Sometimes, Row 2 may not have values (not even a 0). The formula for C3 is =SUM(B2:C2) and =SUM(B2:G2) for G3. The challenge is that I have a very long row and summing it individually would be inefficient.

    Is there a way of automating the formula so that the cell ranges expand automatically which I could use to fill to the right?

    Thanks.



    A B C D E F G
    1 Row 1 1 2 3 4 5 6
    2 Row 2 1 0 4 15 0 3
    3 Row 3 1 1 5 20 20 23
    Last edited by ExelForum001; 05-08-2014 at 02:57 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-01-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    324

    Re: Automatically expanding cell ranges

    Will it always be a sum of B2 to the current column?

    If so baste the below code in C3 and drag to your desired length

    Please Login or Register  to view this content.

    If you don't want to see zeroes if there are any then us e the code below:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by playaller; 05-08-2014 at 03:29 PM.


    Shelton A.
    If Helpful, Add Reputaion!

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: Automatically expanding cell ranges

    I must be missing something but wouldn't this work?
    =SUM($B$2:C2) then dragged right.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Registered User
    Join Date
    04-05-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Automatically expanding cell ranges

    Quote Originally Posted by playaller View Post
    Will it always be a sum of B2 to the current column?

    If so baste the below code in C3 and drag to your desired length

    Please Login or Register  to view this content.

    If you don't want to see zeroes if there are any then us e the code below:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Hi Playaller,

    Thank you! Your formulas worked for my purpose.

  5. #5
    Valued Forum Contributor
    Join Date
    09-01-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    324

    Re: Automatically expanding cell ranges

    You're more than welcome! Glad I could help. Don't forget to mark the thread as solved if you're good with the results.

  6. #6
    Registered User
    Join Date
    04-05-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Automatically expanding cell ranges

    Hi Sambo kid,

    Your solution works. It is essentially similar to Playaller's. Thanks.

+ 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. Self Expanding/Refreshing Ranges
    By par0016 in forum Excel General
    Replies: 12
    Last Post: 10-02-2012, 02:49 PM
  2. expanding size ranges to known increments
    By mem1tg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2007, 12:03 PM
  3. [SOLVED] Using Query and expanding named ranges
    By [email protected] in forum Excel General
    Replies: 1
    Last Post: 07-21-2006, 03:40 PM
  4. Expanding ranges causing probs?
    By Simon Lloyd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-04-2006, 11:04 AM
  5. Expanding ranges after sort???
    By Simon Lloyd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-01-2006, 01:45 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