+ Reply to Thread
Results 1 to 7 of 7

Reference to calculate subtotal each 8th Row

  1. #1
    Registered User
    Join Date
    10-14-2011
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    9

    Reference to calculate subtotal each 8th Row

    Each week a total is calculated for the week just passed. Each 8th row is reserved for subtotals.
    What I need is to have the 8th row make a subtotal each time. What i need should result in the following logic:
    '=IF(MOD(ROW()-1,8),C9,SUM(D2:D8))
    '=IF(MOD(ROW()-1,8),C10,SUM(#REF!))

    How do i get the sum range to look at the 7 preceding rows each time?
    Attached Files Attached Files
    Last edited by Baabaa; 10-23-2021 at 10:10 PM. Reason: Upload sample file

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Reference to calculate subtotal each 8th Row

    There are instructions at the top of the page on how to post a sample sheet

  3. #3
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    491

    Re: Reference to calculate subtotal each 8th Row

    Something like this?

    F11=IF(MOD(ROWS(F$11:F12),8),,SUM(OFFSET(B12,,,-8)))

    Data in that example in B11 and down.

  4. #4
    Registered User
    Join Date
    10-14-2011
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Reference to calculate subtotal each 8th Row

    Thank you. I used part of the only other response. Can you assist me further?

  5. #5
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    491

    Re: Reference to calculate subtotal each 8th Row

    Try this: D2==IF(MOD(ROWS(D$2:D2),8),C2,SUM(OFFSET(D1,,,-7)))

  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: Reference to calculate subtotal each 8th Row

    Edited: To correct wrong interpretation.

    Another way.

    In E9 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and then fill up ↑.
    Last edited by FlameRetired; 10-21-2021 at 11:29 AM. Reason: correct bad formula
    Dave

  7. #7
    Registered User
    Join Date
    10-14-2011
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Reference to calculate subtotal each 8th Row

    Quote Originally Posted by RaulSerg View Post
    Try this: D2==IF(MOD(ROWS(D$2:D2),8),C2,SUM(OFFSET(D1,,,-7)))

    I didn't understand your response the first time but this solution actually solves my problem perfectly. Thank you.

+ 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] To calculate % based on subtotal
    By lalaarif1 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-06-2018, 04:09 PM
  2. To calculate % based on subtotal
    By lalaarif1 in forum Microsoft Windows Help
    Replies: 0
    Last Post: 08-05-2018, 10:48 AM
  3. No Mode fuction in subtotal...how to calculate?
    By Dandrea22 in forum Excel General
    Replies: 11
    Last Post: 07-22-2014, 07:26 AM
  4. [SOLVED] Macro to calculate on each subtotal line
    By kim3169 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-28-2013, 12:00 AM
  5. 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
  6. Have Total, Need to calculate Subtotal
    By PennyG in forum Excel General
    Replies: 0
    Last Post: 07-14-2010, 11:00 PM
  7. How to calculate subtotal if a row is hidden
    By MUHAMMAD SAMI in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-29-2005, 09:06 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