+ Reply to Thread
Results 1 to 4 of 4

Sum Every n-rows which Contain Data

  1. #1
    Registered User
    Join Date
    07-31-2014
    Location
    New York
    MS-Off Ver
    2013
    Posts
    4

    Sum Every n-rows which Contain Data

    Dear readers, the problem I am facing is how to sum every 2 consecutive rows which contain data, and place the sum value in the adjacent column across from the 2nd row. Then, the formula will move down to the next two rows which contain data, and perform the sum again.

    There are values in the DATA column, but it is not continuous. There are sometimes rows with blank cells, and thus I cannot just use a formula to sum every two rows. I need a formula to search for the first row with data, then find the next row which contains data, and then sum those two rows. There is no pattern to the DATA column; values appear randomly. The table should look like this, for the column titled SUM:

    A B C
    Row DATA SUM
    1 2.5
    2 3 5.5
    3
    4
    5
    6 4
    7
    8
    9 12 16
    10
    11

    So, in the example above: I need the sum of every two rows of DATA, and this sum will move down the column of SUM.

    So, the formula in column C will need to sum DATA for Rows 1 & 2, producing (2.5) + (3) = (5.5), placed across from the second value in DATA.

    Also, it will need to sum DATA for Rows 6 & 9, producing (4) + (12) = (16), placed across from the second value in DATA.

    Any help will be greatly appreciated and thank you for considering this problem. If it helps, all the data is in an Excel Table (DATA and SUM are column headers). So will it be easier using absolute/table references? Thanks.
    Last edited by KnightVision; 06-19-2019 at 09:59 AM. Reason: Updated info

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Sum Every n-rows which Contain Data

    Hi

    Try this in C2 and copy down (note: C1 must not contain a number or it's 0)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-31-2014
    Location
    New York
    MS-Off Ver
    2013
    Posts
    4

    Re: Sum Every n-rows which Contain Data

    Worked out just perfectly as I needed! Thank you so much.

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Sum Every n-rows which Contain Data

    You are welcome. I'm happy to have helped.

    Please select Thread Tools from the menu link above and mark this thread as SOLVED.

    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. Insert set number of rows between data and copy and paste data above empty rows
    By Orionm45 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2017, 11:35 AM
  2. [SOLVED] Check Column data in two rows is match for data in two rows on another sheet and return
    By Iain Clarendon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-16-2015, 09:25 PM
  3. Replies: 3
    Last Post: 05-07-2015, 01:26 PM
  4. Replies: 4
    Last Post: 09-16-2014, 10:48 AM
  5. Replies: 1
    Last Post: 07-17-2014, 04:49 AM
  6. [SOLVED] Delete blank rows between data rows, shift rows up, then repeat
    By excelactuary in forum Excel General
    Replies: 2
    Last Post: 03-11-2013, 11:53 AM
  7. Replies: 6
    Last Post: 08-18-2012, 05:00 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