Skip to main content
 

How to quickly sum every other or nth row/column in Excel?

Author: Xiaoyang Last Modified: 2024-09-10

As we all know, we can apply the Sum function to add a list of cells, but sometimes we need to sum every other cell for some purpose, and Excel has no standard function allow us to sum every nth cell. In this situation, how could we sum every other or nth row / column in Excel?

Sum every other or nth row/column with Formulas

Sum every other or nth row/column with User Defined Function

Sum / average / count every other or nth row/column with Kutools for Excel


Sum every other or nth row/column with Formulas

Through the following example, I will show you how to apply the formulas that sum every other cell.

1. Use the array formulas to sum every other row or column

In a blank cell, please enter this formula: =SUM(IF(MOD(ROW($B$1:$B$15),2)=0,$B$1:$B$15,0)), then press Ctrl + Shift + Enter keys, and every other cell values in the column B have been summed. See screenshots:

 Use a formula to sum every other row arrow right press Ctrl + Shift + Enter keys to get a result

Notes:

1. In the above array formula, you can change the number 2 to 3, 4, 5…, it means sum every 3rd row, every 4th row, every 5th row…

2. If you want to sum every other column, you can input the following formula: =SUM(IF(MOD(COLUMN($A$1:$O$1),2)=0,$A$1:$O$1,0)), and press Ctrl + Shift + Enter keys to get the result. See screenshot:

apply a formula to sum every other column

2. Use the formulas to sum every other row or column

Here is another formula can help you to sum every other or nth cell in a worksheet.

In an empty cell, please enter this formula: =SUMPRODUCT((MOD(ROW($B$1:$B$15),3)=0)*($B$1:$B$15)). And then press Enter key, and every 3rd cell has been added. See screenshots:

Use a formula to sum every other row arrow right press Enter key to get the result

Notes:

1. In the above formula, you can change the number 3 to 4, 5, 6…, it means sum every 4th row, every 5th row, every 6th row…

2. If you want to sum every other column, you can input the following formula: =SUMPRODUCT((MOD(COLUMN($A$1:$O$1),3)=0)*($A$1:$O$1)).

apply a formula to sum every other column

a screenshot of kutools for excel ai

Unlock Excel Magic with Kutools AI

  • Smart Execution: Perform cell operations, analyze data, and create charts—all driven by simple commands.
  • Custom Formulas: Generate tailored formulas to streamline your workflows.
  • VBA Coding: Write and implement VBA code effortlessly.
  • Formula Interpretation: Understand complex formulas with ease.
  • Text Translation: Break language barriers within your spreadsheets.
Enhance your Excel capabilities with AI-powered tools. Download Now and experience efficiency like never before!

Sum every other or nth row/column with User Defined Function

The following user defined function also can help you to add every other or nth cell in Excel.

1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module window.

Function SumIntervalRows(WorkRng As Range, interval As Integer) As Double
'Updateby Extendoffice
Dim arr As Variant
Dim total As Double
total = 0
arr = WorkRng.Value
For i = interval To UBound(arr, 1) Step interval
    total = total + arr(i, 1)
Next
SumIntervalRows = total
End Function
Function SumIntervalCols(WorkRng As Range, interval As Integer) As Double
Dim arr As Variant
Dim total As Double
total = 0
arr = WorkRng.Value
For j = interval To UBound(arr, 2) Step interval
    total = total + arr(1, j)
Next
SumIntervalCols = total
End Function

3. Then save this code, and type the following formula into a blank cell as you need, see screenshots:

For summing every fourth row: =SumIntervalRows (B1:B15,4)

sum every fourth row

For summing every fourth column: =SumIntervalCols (A1:O1,4)

sum every fourth column

4. Then press Enter key, you will get the calculation. See screenshots:

Sum every fourth row:

result of summing every fourth row

Sum every fourth column:

result of summing every fourth column

Note: You can change the number 4 to any other numbers, such as 2, 3, 5… it means sum every second row, every third row, every fifth row or column.


Sum / average / count every other or nth row/column with Kutools for Excel

Maybe both the formulas and user defined function are somewhat difficult for most of you, here I can introduce you an easier way to solve this task.

With Kutools for Excel’s Select Interval Rows & Columns, you can select every other or nth cell that you need first, and then give the selected cells a defined name, at last, using the Sum function to sum the cells.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Enhanced with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

After installing Kutools for Excel, please do as the following steps:

1. Select the column that you want to sum every other or nth cell.

2. Click Kutools > Select > Select Interval Rows & Columns, see screenshot:

click Select Interval Rows & Columns feature of kutools

3. In the Select Interval Rows & Columns dialog box, specify the operations as you need, see screenshot:

specify the operations in the dialog box

4. Click OK, and every other row has been selected from the first row, and now, you can view the calculated results, such as average, sum, count are displayed at the bottom of the status bar. See screenshot:

every other row has been selected, view the calculated results  at the bottom of the status bar

Notes:

1. With this function, you can set the number 2, 3, 4… in Interval of option, and you will select the cells with the interval of 2, 3, 4 rows starting from the first row of the range in the step 3.

2. With the above steps, you can also sum every other or nth column as you need.

Download and free trial Kutools for Excel Now !


Related articles:

How to sum only filtered or visible cells in Excel?

How to sum the absolute values 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...


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!