+ Reply to Thread
Results 1 to 4 of 4

Dynamic Range Add Rows and Sum/Subtotal row Formula or VBA?

  1. #1
    Registered User
    Join Date
    10-25-2014
    Location
    USA
    MS-Off Ver
    Mac 2011
    Posts
    13

    Question Dynamic Range Add Rows and Sum/Subtotal row Formula or VBA?

    Hi I am having trouble understanding dynamic range as a way to programatically add rows based on the value in a cell. Once I have been able to do that I need to dynamically add a set of formulas across the new columns and dynamically sum the columns. The screen shots are of the Excel attachment.

    Thanks in advance.

    Tim

    Here is what the array looks like with a row length value of 12. I want to expand or reduce based on the value in D2
    ScreenShot.jpg

    Here is what the array looks like with a row length value of 24. I want to expand or reduce based on the value in D2
    ScreenShot2.jpg

    Dynamic Range Formula Help=2.xlsx

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2503
    Posts
    13,702

    Re: Dynamic Range Add Rows and Sum/Subtotal row Formula or VBA?

    Not clear which thing is 'dynamic' here. I'll hazard a guess. Here is a formula for calculating a dynamic range

    depending upon amount of data in the range....shrinks and grows according to last cell that meets the criteria

    in cell D2. Usually these are put in Name Manager, given a name and referenced in formulas by that name.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Is this what you are looking for?

    Edit: I almost forgot.

    In cell E2 it reads [referencing D2]: "Hard Coded Value. Number of rows to be dynamically created in list below. This tab is 12 and the next tab is 24 but could be any number 1-1000+"

    If it's hardcoded I'll say no more.....but if the number is to be determined dynamically the dynamic

    formula you will need for that in cell D2 would be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This would yield the number of rows with numbers in them in column A and thereby the last number in that column. The Dynamic Named Range mentioned above will grow / shrink accordingly.
    Last edited by FlameRetired; 01-14-2015 at 08:56 PM. Reason: omitted detail

  3. #3
    Registered User
    Join Date
    10-25-2014
    Location
    USA
    MS-Off Ver
    Mac 2011
    Posts
    13

    Re: Dynamic Range Add Rows and Sum/Subtotal row Formula or VBA?

    Not quite what I was I was looking for. I am trying to add an entire N# of rows based on the value in D2 such that if it is 6 there are 6 rows starting in A13:P18 or if there are 17 rows there are 17 rows staring in A13:p29. Once the number of rows is inputed into cell in D2 the new number of rows will include all formulas from what are currently in cells A13:p13. I then need a total row that sums the range above it (as is seen in the screenshot E25:P25 when the number of rows is 12). Does this make sense? Thanks in advance.

    Tim

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2503
    Posts
    13,702

    Re: Dynamic Range Add Rows and Sum/Subtotal row Formula or VBA?

    To do that you might consider VBA. Sorry I couldn't help.

+ 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. [SOLVED] Dynamic Range formula to add rows?
    By osninc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-13-2015, 09:52 PM
  2. Frequency with subtotal function formula for dynamic histogram
    By 5150 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-12-2013, 08:37 PM
  3. Replies: 8
    Last Post: 07-31-2012, 09:41 AM
  4. Subtotal - Delete zero Subtotal and prior rows that calculate to that zero Subtotal
    By Whatsherface in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2012, 08:37 PM
  5. [SOLVED] =Subtotal(countif,Range); Subtotal and countif in 1 formula [SOLVED]
    By thomas.mapua in forum Excel General
    Replies: 5
    Last Post: 01-06-2012, 11:33 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