To sum every 5th cell in Excel, use a combination of the SUMPRODUCT, MOD, and ROW functions. The most effective formula for a column of data (for example, A1 to A100) is: =SUMPRODUCT((MOD(ROW(A1:A100)-ROW(A1),5)=0)*(A1:A100)). This formula identifies the row number of each cell, subtracts the starting row to normalize the count to zero, checks if that number is divisible by 5 using the MOD function, and then sums only the cells that meet that criteria.
What You'll Need
- Microsoft Excel (any version from 2010 onwards, including Office 365).
- A dataset organized in a single column or a single row.
- Basic familiarity with selecting cell ranges.
Step-by-Step
- Identify Your Data Range: Determine exactly where your data starts and ends. For this guide, we will assume your data is in column A, starting at cell A1 and ending at cell A100. If your data starts at A2, you will need to adjust the formula accordingly to ensure the "first" cell you want to sum is counted as the starting point.
- Select the Destination Cell: Click on the cell where you want the final total to appear. Ensure this cell is not within the range you are summing, otherwise, you will create a circular reference error.
- Enter the SUMPRODUCT Function: Begin typing
=SUMPRODUCT(. The SUMPRODUCT function is used here because it handles arrays (groups of cells) without requiring you to press Ctrl+Shift+Enter, which was necessary for older array formulas. - Create the Row Logic: Inside the parentheses, enter the MOD and ROW functions:
(MOD(ROW(A1:A100)-ROW(A1),5)=0).ROW(A1:A100)creates a list of numbers from 1 to 100.-ROW(A1)subtracts the starting row number (1). This ensures that the first cell in your range is treated as index 0.MOD(..., 5)divides that index by 5 and returns the remainder. If the index is 0, 5, 10, 15, etc., the remainder is 0.=0turns this into a TRUE or FALSE statement.
- Link the Logic to the Data: After the closing parenthesis of the MOD function, add an asterisk (the multiplication symbol) and then select your data range again:
*(A1:A100). In Excel, multiplying a TRUE/FALSE value by a number converts TRUE to 1 and FALSE to 0. Therefore, any cell that is not a 5th cell is multiplied by 0, effectively removing it from the sum. - Close the Formula and Press Enter: Close the final parenthesis and press Enter. The complete formula should look like this:
=SUMPRODUCT((MOD(ROW(A1:A100)-ROW(A1),5)=0)*(A1:A100)). - Verify the Result: To ensure the formula is working, manually sum the first three target cells (e.g., A1, A6, and A11) and check if the formula's running total matches your manual calculation.
Common Mistakes
One of the most frequent errors is forgetting to subtract the starting row. If your data starts on row 2 (A2) and you use ROW(A2:A100) without subtracting ROW(A2), Excel will use the absolute row number. Since 2 divided by 5 has a remainder of 2, not 0, Excel will not sum the first cell in your range. It will instead sum the first cell that is actually divisible by 5 (row 5, 10, 15), which might not be the "every 5th" pattern you intended relative to your data start.
Another common mistake is including text or headers within the range. If your range A1:A100 includes a header in A1, the formula will attempt to multiply the text "Header" by 0 or 1. While the MOD logic might ignore it, the multiplication part of the SUMPRODUCT function will return a #VALUE! error if it encounters a cell containing text that cannot be converted to a number.
Users also frequently confuse the MOD divisor. If you want every 5th cell, the number must be 5. If you accidentally put 4, you will be summing every 4th cell. Ensure the number corresponds exactly to the interval you desire.
Tips
If you want to change the starting point—for example, if you want to sum the 2nd, 7th, and 12th cells instead of the 1st, 6th, and 11th—simply change the =0 at the end of the MOD function to =1. The number you put there (0 through 4) determines the offset of your sum.
For those using the newest versions of Excel (Office 365 or Excel 2021), you can use the FILTER function for a more intuitive approach. A formula like =SUM(FILTER(A1:A100, MOD(SEQUENCE(ROWS(A1:A100),1,0),5)=0)) achieves the same result. The SEQUENCE function creates the index automatically, and FILTER removes the cells that don't fit the criteria before the SUM function adds them up.
To make your formula dynamic, replace the hard-coded range (A1:A100) with a Named Range or an Excel Table. If you convert your data to a Table (Ctrl+T), you can use structured references like Table1[Amount]. This ensures that as you add new rows to your data, the formula automatically expands to include the new "5th" cells without you having to manually update the range from A100 to A105.
Troubleshooting
If your formula returns a #VALUE! error, the first thing to check is for non-numeric data in your range. Even a single cell with a space character or a hidden apostrophe can break the SUMPRODUCT multiplication. To fix this, you can use the SUM function combined with an IF statement as an array formula: =SUM(IF(MOD(ROW(A1:A100)-ROW(A1),5)=0, A1:A100, 0)). Note that in older versions of Excel, this requires pressing Ctrl+Shift+Enter.
If the formula returns 0 but you know there are numbers in the cells, check your MOD logic. You may be offsetting the count incorrectly. Try changing the =0 to =1, =2, =3, or =4 to see if the sum appears. If it does, your data range does not start on a row that aligns with your original MOD calculation.
If the result is higher than expected, check if you have accidentally included the total cell itself in the range. For instance, if your formula is in cell A101 and your range is A1:A101, you have created a circular reference. Excel will usually warn you about this, but if warnings are disabled, it will produce an incorrect, inflating sum.
Frequently Asked Questions
Can I sum every 5th cell in a horizontal row?
Yes. You simply replace the ROW function with the COLUMN function. The formula would be =SUMPRODUCT((MOD(COLUMN(A1:Z1)-COLUMN(A1),5)=0)*(A1:Z1)). This tells Excel to look at the column index instead of the row index.
Does this work if I have empty cells in my range?
Yes, empty cells are treated as zeros by the SUMPRODUCT function. They will not cause an error, but they will not contribute to the total sum.
How do I sum every 5th cell starting from the bottom?
The easiest way is to create a helper column that numbers your rows in reverse order (e.g., 100, 99, 98...) and then use a SUMIF or SUMPRODUCT formula based on that helper column's values.
Can I use this to average every 5th cell instead of summing?
You cannot simply replace SUMPRODUCT with AVERAGEPRODUCT because that doesn't exist. Instead, use the FILTER function if available: =AVERAGE(FILTER(A1:A100, MOD(SEQUENCE(ROWS(A1:A100),1,0),5)=0)). If you don't have FILTER, divide the SUMPRODUCT result by the count of cells: =SUMPRODUCT((MOD(ROW(A1:A100)-ROW(A1),5)=0)*(A1:A100)) / SUMPRODUCT(--(MOD(ROW(A1:A100)-ROW(A1),5)=0)).
Will this formula slow down my workbook?
For ranges under 10,000 cells, the impact is negligible. However, SUMPRODUCT is an array-based calculation. If you apply this formula across thousands of cells in a very large spreadsheet, you may notice a slight lag during recalculation. In those cases, a helper column is more efficient.