+ Reply to Thread
Results 1 to 13 of 13

Sum Non-consecutive Numbers

  1. #1
    Registered User
    Join Date
    10-13-2011
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Sum Non-consecutive Numbers

    Hi All,

    I have a range of data A1:A500 and I'd like to find the sum of every non-consecutive seven cells. For example, I'd like to sum A1:A7 and then sum A8:A14. Can someone please help? Any help would be greatly appreciated. Thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Need a Function to Sum Non-consecutive Numbers

    Can you clarify?You say non-consecutive cells, but the ranges you state you wish to sum are indeed consecutive cells.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,306

    Re: Need a Function to Sum Non-consecutive Numbers

    Hi dschwister and welcome to the forum.

    Find the attached with what I think you want. The equation in B1 is:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by MarvinP; 10-13-2011 at 01:15 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    10-13-2011
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Need a Function to Sum Non-consecutive Numbers

    Quote Originally Posted by brokenbiscuits View Post
    Can you clarify?You say non-consecutive cells, but the ranges you state you wish to sum are indeed consecutive cells.

    I say non-consecutive, because I want to sum A1:A7, and then A8:A14 (not A2:A8). Does that make sense?

  5. #5
    Registered User
    Join Date
    10-13-2011
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Need a Function to Sum Non-consecutive Numbers

    Quote Originally Posted by MarvinP View Post
    Hi dschwister and welcome to the forum.

    Find the attached with what I think you want. The equation in B1 is:
    Please Login or Register  to view this content.

    Thanks a lot MarvinP. So, I'm at work and unfortunately don't have MS Excel. I'm relegated to Google Spreadsheets. Are you actually putting a value in the ( ) after ROW?

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need a Function to Sum Non-consecutive Numbers

    Without the indirect (but using Arrayed function, enter with CNTRL SHFT ENTER)

    =SUM(IF(INT((ROW($A$1:$A$500)-1)/7)+1=ROW(),$A$1:$A$500,))
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,306

    Re: Need a Function to Sum Non-consecutive Numbers

    The function "Row()" simply reports back the current row number the formula is in.

    I have no idea if Google Docs has this ability or not.

  8. #8
    Registered User
    Join Date
    10-13-2011
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Need a Function to Sum Non-consecutive Numbers

    Quote Originally Posted by ChemistB View Post
    Without the indirect (but using Arrayed function, enter with CNTRL SHFT ENTER)

    =SUM(IF(INT((ROW($A$1:$A$500)-1)/7)+1=ROW(),$A$1:$A$500,))
    Thanks ChemistB. That unfortunately doesn't work though. That formula just added up my entire column.

    What I want to do is add A1:A7 and put that value in B1. Then in B2, I want to add A8:14 and so on. Does this make sense?

  9. #9
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,306

    Re: Need a Function to Sum Non-consecutive Numbers

    Hi dschwister,

    I believe my formula does what you want. Do you have a list of functions that Google Doc Spreadsheet supports? I know there are some differences between the two function lists. You know that the Excel Forum will be pro Excel and wonder why you would ever want Google Docs as s substitute. My belief in life is "you get what you pay for". By the way, I really don't care what product you are using as I happy to simply help others.

  10. #10
    Registered User
    Join Date
    10-13-2011
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Need a Function to Sum Non-consecutive Numbers

    Quote Originally Posted by MarvinP View Post
    The function "Row()" simply reports back the current row number the formula is in.

    I have no idea if Google Docs has this ability or not.
    Okay. Should I have a value between the () then?

  11. #11
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,306

    Re: Need a Function to Sum Non-consecutive Numbers

    Hi - I'm so sorry in that I didn't copy and paste the entire formula. It should be
    Please Login or Register  to view this content.
    I've corrected it in the post above.

    See if this works instead of that half baked answer I gave before.
    This stuff is hard enough without giving partial answers. Forgive me please!

  12. #12
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need a Function to Sum Non-consecutive Numbers

    Mine works (In Excel at least), You need to enter it with CNTRL SHFT ENTER instead of just pushing ENTER. You'll see brackets {} appear around the equation if you do it right.

  13. #13
    Registered User
    Join Date
    10-13-2011
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Need a Function to Sum Non-consecutive Numbers

    Quote Originally Posted by MarvinP View Post
    Hi - I'm so sorry in that I didn't copy and paste the entire formula. It should be
    Please Login or Register  to view this content.
    I've corrected it in the post above.

    See if this works instead of that half baked answer I gave before.
    This stuff is hard enough without giving partial answers. Forgive me please!
    Sorry MarvinP. That still isn't working. Just to clarify, I'd like to take data in column B2:B500 and in C2 sum from B2:B9 and then in C3 sum from B10:B17 and in C4 sum from C18:C25. Does this make sense?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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