+ Reply to Thread
Results 1 to 9 of 9

Subtotal ranges when copying formulas through the report

  1. #1
    Forum Contributor
    Join Date
    08-10-2015
    Location
    Sarasota, FL
    MS-Off Ver
    MS 365
    Posts
    77

    Subtotal ranges when copying formulas through the report

    I have a report that I subtotaled on sum on 1 column

    I have since had to add more columns with much more complicated formulas, but I need the range of cells that was part of the subtotal. The problem is that some ranges are 1 row and other ranges can be 200 rows - they vary.

    Right now I am copying the range from the subtotal sum cell that was auto created with the subtotal function and entering it into my complicated formula, which gets tedious since I have to do this about 50 times.

    There has to be a better, smarter way?

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Subtotal ranges when copying formulas through the report

    You get better help on your question if you add a small excel file, without confidential information.

    Please also add manualy the expected result in your file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    08-10-2015
    Location
    Sarasota, FL
    MS-Off Ver
    MS 365
    Posts
    77

    Re: Subtotal ranges when copying formulas through the report

    Tons of confidential information....but let me see if I can scrub it.....
    Ok,
    I subtotaled on the Client Name and Sumed the Pay Reg Hours column
    Then I had to add the calculations and formulas into D, K, L, M, and N

    I had to manually enter the range in the formula - for example for Big Bird I had to enter E2:E8 for the formula in Column D and again in the rest of the columns mentioned above for the formulas (rows 2-8 in various columns)

    Then I had to do the same in thing for each of the clients on the subtotal line (d9, d23, d40, etc)
    Is there a way to let it calculate those ranges without me doing it manually?

    Does that make better sense?
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    08-10-2015
    Location
    Sarasota, FL
    MS-Off Ver
    MS 365
    Posts
    77

    Re: Subtotal ranges when copying formulas through the report

    hmmmm, my frequency formula in E isn't working either...because there are multiple days with different times and it is counting each instance instead of each day.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Subtotal ranges when copying formulas through the report

    With a pivot table.

    See the attached file.

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Subtotal ranges when copying formulas through the report

    This array entered formula returns the same as oeldere's pivot table. It also returns the same Totals as your upload except for Oscar T Grouch.

    Array enter this formula in D2 and fill down.

    =IFERROR(SUM(IF(FREQUENCY(IF(ISNUMBER(SEARCH(" Total",A2)),IF(SUBSTITUTE(A2," Total","")=$A$2:$A$64,$E$2:$E$64,""),""),IF(ISNUMBER(SEARCH(" Total",A2)),IF(SUBSTITUTE(A2," Total","")=$A$2:$A$64,$E$2:$E$64,""),"")),1,0)),"")

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you aren’t familiar with array-entered formulas array enter means the formula must be committed by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

    What numbers are you expecting for each Total?

    The workbook is attached.
    Dave

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Subtotal ranges when copying formulas through the report

    I think I see what you are saying now.

    Use this array formula.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    It returns 7, 10, 11 and 23.

    Does this do what you want?

  8. #8
    Forum Contributor
    Join Date
    08-10-2015
    Location
    Sarasota, FL
    MS-Off Ver
    MS 365
    Posts
    77

    Re: Subtotal ranges when copying formulas through the report

    You are absolutely my heros!!!!! That was SO much faster and easier than what I was doing! While the pivot table wasn't what I was going after, it did get me to thinking about how I might be able to use pivot tables in the future (I have started down a very detailed data analysis road these days).

    FlameRetired - the last array formula was absolutely what I needed - and now I'm thinking about how else it might be able to help me, so thank you!

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Subtotal ranges when copying formulas through the report

    My pleasure. Glad it helped and thank you for the rep. That was a fun and challenging problem.

+ 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] Copying worksheets to include all ranges and formulas
    By damianberry in forum Excel General
    Replies: 4
    Last Post: 11-21-2012, 03:38 AM
  2. [SOLVED] not able to create subtotal summary report
    By Ron Desrosiers in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-21-2006, 07:40 PM
  3. space after subtotal in report
    By LindaB@work in forum Excel General
    Replies: 5
    Last Post: 04-07-2006, 01:35 PM
  4. move to another cell within a subtotal report within a macro
    By Dave Peterson in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 05:05 AM

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