+ Reply to Thread
Results 1 to 8 of 8

Dynamic range for a subtotals of rows

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    St louis, mo
    MS-Off Ver
    Excel 2007
    Posts
    33

    Dynamic range for a subtotals of rows

    I am looking for a dynamic formula that I would be able to plug into a cell and count down until the next blank is hit. Sounds easy but the number of rows can change everyday. It would be nice to be able to have something to where I copy the rows that have a date in them and paste them. They would then count the rows with data until a blank. I have provided an example if this is confusing. Sheet 1 has what my data looks like and Sheet 2 is what I would want it to look like counting the data but would of course what that number to be a formula that does it automatically.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-09-2011
    Location
    St louis, mo
    MS-Off Ver
    Excel 2007
    Posts
    33

    Dynamic range for Subtotals

    Looking to count the number of rows with data which would just be CountA. I want to be able to paste this on each row for a given date and it count until there is another blank or it could count until it hits a different date. Attached is a document that contains the data similar to what I have on Sheet 1 and then Sheet 2 what I would want to have with the subtotal numbers being the formula.
    Attached Files Attached Files

  3. #3
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Dynamic range for Subtotals

    not a pretty solution, but here is what i could come up with...

    in your sample workbook, paste this formula FIRST in cell B3, and ARRAY-confirm it:

    Please Login or Register  to view this content.
    once you have entered and confirmed that formula in B3, THEN copy it and paste it on to B6, B9, B15 and B18.

    UPDATE:

    in case your data span farther than A27, just replace with a high number, such as A100.
    Last edited by icestationzbra; 03-28-2013 at 05:36 PM.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  4. #4
    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,929

    Re: Dynamic range for a subtotals of rows

    How is this thread any different to this 1?

    http://www.excelforum.com/excel-form...subtotals.html
    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

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,583

    Re: Dynamic range for a subtotals of rows

    PL see the attached file with formula.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-09-2011
    Location
    St louis, mo
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Dynamic range for a subtotals of rows

    Yes this is a similar thread, I assumed this was poorly worded so I thought I would try again. Kvsrinivasamurthy thanks for the formula but it seems like if more data is added to the end of the 27th row then it will not be calculated correctly. The formula is basing itself off that row so when its changed then the data is messed up.

  7. #7
    Registered User
    Join Date
    06-09-2011
    Location
    St louis, mo
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Dynamic range for Subtotals

    Works great but once there are new rows added then it won't count anything passed the 27th row. If the 27 in the formula is extended then the total is counted and then it subtracts the rows.

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,583

    Re: Dynamic range for a subtotals of rows

    If more data is added in the formula you have to change 27 by the last row number or use the below formula so that up to 1000 rows you need no change.

    It is array formula. After editing Press Ctrl+Shift+Enter keys simultaneously.

    Please Login or Register  to view this content.
    Last edited by kvsrinivasamurthy; 03-29-2013 at 11:11 AM.

+ 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