+ Reply to Thread
Results 1 to 8 of 8

Sum Every other row

Hybrid View

  1. #1
    Registered User
    Join Date
    05-13-2007
    Posts
    19

    Sum Every other row

    Is there a way to write a formula in Excel that will sum cells in every third row?

  2. #2
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    yes..........for example for summing rows 1, 4, 7, etc through row 20

    =SUM(IF(MOD(ROW(A1:A20),3)=1,A1:A20))

    entered with control+shift+enter
    not a professional, just trying to assist.....

  3. #3
    Registered User
    Join Date
    05-13-2007
    Posts
    19

    Why Ctrl+Shift+Enter?

    Just wondering. I am not familiar with this command in Excel. What does it do? Also, I am working on a MAC - does that influence use of this command?

    thanks for your help

    Nicole

  4. #4
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    the mod function returns the remainder after the the first arguement is divided by the 2nd The row function returns the row number.

    So, row(a3) returns 3 and
    mod(row(a3),3) returns 0 (3/3 = 1 with no remainder

    you can evaluate a range of rows (an array)

    so, the formula determines if the mod, 3 of the row is 1 (for example rows 1, 4, 7, etc), and sums only those rows, ignoring the rest

  5. #5
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    oh, on the Mac question, I do not know, but I would assume that Excel on Macs can handle arrays

  6. #6
    Registered User
    Join Date
    05-13-2007
    Posts
    19

    don't think I have this one straight

    I have rows C9:C100, I want to add rows, C9, C14, C19, C24, C29... etc. until I get through row C100. So, I want to add every 5th or 6th (not sure which) row, starting with C9.

    Do we still have the right formula

  7. #7
    Registered User
    Join Date
    05-13-2007
    Posts
    19

    Says I am referring to Empty cells

    I understand the formula now. Thanks,

    However, there are a number of blank rows (every 6th row) between C9 and C100.

    Will this mess the formula up? I am getting a strange total.

+ 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