+ Reply to Thread
Results 1 to 4 of 4

summing up n consecutive cells in a column for 1000 cells

  1. #1
    Registered User
    Join Date
    11-15-2012
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    14

    summing up n consecutive cells in a column for 1000 cells

    Hello,

    Kindly assist me with a macro for summing up say 7 consecutive cells in a column, and then sum up next 7 consecutive cells, etc for say 1000 rows (1000 cells in a column).

    Thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: summing up n consecutive cells in a column for 1000 cells

    Hi
    Copy and paste this macro into a Module in your Workbook and run it.
    The Macro works on values stored in column A from row 1 to 1000. You may need to change the column and row numbers to suit your needs.

    Sub Macro1()
    '
    ' Macro1 Macro
    '
    '
    For Count = 1 To 1000
    Range("B" & Count + 6).Select
    ActiveCell.FormulaR1C1 = "=SUM(R[-6]C[-1]:RC[-1])"
    Count = Count + 6
    Next Count
    End Sub

    Good luck.
    Tony

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: summing up n consecutive cells in a column for 1000 cells

    Putting =SUM(A1:A7) in a B1 and dragging down to B1000 will do that.

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Registered User
    Join Date
    11-15-2012
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: summing up n consecutive cells in a column for 1000 cells

    Thanks so much. Works but how do I now consolidate the data leaving out the blank spaces?

+ 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