Skip to main content

How to sum every n rows down in Excel?

Author: Xiaoyang Last Modified: 2020-04-28
doc-sum-every-n-rows-1

Supposing you have a long list of data in your worksheet, and you need to sum every next 5 rows down like this: =SUM(B2:B6), =SUM(B7:B11) and so on, and then put the result in another column as following screenshot shown. In this article, I will talk about some good formulas for you to solve this problem.

Sum every n rows down in Excel with formulas

Sum every n rows down in Excel with Kutools for Excel


Sum every n rows down in Excel with formulas

In this example, I will sum every 5 rows of the data, please apply the following formula:

1. Enter this formula into a blank cell where you want to put the result: =SUM(OFFSET($B$2,(ROW()-ROW($B$2))*5,0,5,1))

doc-sum-every-n-rows-1

Tip: In the above formula, B2 indicates the started row number you want to sum, and 5 stands for the incremental row numbers. If you want to sum every 10 rows in column B, you just need to change 5 to 10.

2. Then drag the fill handle over to the cells until 0 is displayed. And you will get the results you need. See screenshot:

doc-sum-every-n-rows-1

Notes:

1. Sometimes, you would like the results of every 5 rows’ total values displayed at the last line in column C as following screenshot shown:

doc-sum-every-n-rows-1

In this case, please enter this formula: =IF(MOD(ROW(),5),"",SUM(OFFSET(B1,,,-5))) (B1 is the first cell value which you want to sum in column B, and 5 is the incremental row numbers) into cell C1, and then drag the fill handle to the cells that you want to apply this formula.

Tip: the above formula can be applied successfully if your data begins at the first cell.

2. If you have a list of values in a row, you can also use a formula to sum every n columns, =SUM(OFFSET($A$1,,(COLUMNS($A$3:A3)-1)*5,,5)) (A1 is the cell reference which your first value located, A3 stands for the cell where you put this formula in, and 5 is the incremental column numbers ), and then drag the fill handle over to the right cells until 0 is displayed, see screenshots:

doc-sum-every-n-rows-5
-1
doc-sum-every-n-rows-6

Sum every n rows down in Excel with Kutools for Excel

If you have Kutools for Excel, you can insert some page breaks every n rows, and then calculate the paging subtotals to get the result.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. 

After installing Kutools for Excel, please do as follows:

1. Click Kutools Plus > Printing > Insert Page Break Every Row, see screenshot:

2. In the Insert Page Break Every Row dialog box, specify the interval of rows which you want to insert the page breaks, and the page breaks have been inserted into the data every 5 rows, see screenshot:

doc-sum-every-n-rows-9

3. And then click Kutools Plus > Printing > Paging Subtotals, see screenshot:

4. In the Paging Subtotals dialog box, check the column header that you want to do some calculations, and choose the function you need, see screenshot:

doc-sum-every-n-rows-11

5. Then click Ok, all every 5 rows data have been summed up, see screenshot:

doc-sum-every-n-rows-12

Download and free trial Kutools for Excel Now !


Demo: Sum / Average every n rows down in Excel with Kutools for Excel

Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!

Related articles:

How to sum values based on text criteria in Excel?

How to sum cells with text and numbers in Excel?

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations