Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to count / sum odd / even numbers or rows in Excel?

If there are range of numbers in your worksheet which contain both odd numbers and even numbers, but now, you need to count or sum only the odd numbers or even numbers. How could you finish this task quickly in Excel worksheet?

Count odd or even numbers with formulas in Excel

Sum odd or even numbers with formulas in Excel

Sum odd or even rows with formulas in Excel

Count/average/sum odd or even rows with Kutools for Excel good idea3


Insert Blank Rows & Columns(insert multiple blank rows/columns at once, or insert blank rows/columns every nth row/col...)

doc insert blank row
Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words...
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum...
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns...
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Create Mailing List and Send Emails by Cell's Value...
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

Count odd or even numbers with formulas in Excel


To count only the even or odd numbers in a range, the following formulas can help you, please do as these:

formula Never need to worry about long long formulas in Excel anymore! Kutools for Excel's Auto Text can add all formulas to a group
as auto text, and liberate your brain! Click here to know Auto Text     Click here to get free trial

1. In order to count the odd numbers only, enter this formula =SUMPRODUCT((MOD(A1:C8,2)<>0)+0) in a blank cell,, see screenshot:

doc-sum-odd-numbers1

2. Then press Enter key, and you will get the number of odd values in the selected range.

doc-sum-odd-numbers1

Notes:

1. If you want to get the number of even values only, please apply this formula =SUMPRODUCT((MOD(A1:C8,2)=0)+0).

2. In above formulas, A1:C8 is the range that you want to count the odd or even numbers, you can change it as you need.


Sum odd or even numbers with formulas in Excel

If you need to add up all the odd or even numbers only in a range, you can use the following formulas: normal formulas or array formulas.

1. Normal formulas for summing odd/even numbers in a range:

Please enter this formula =SUMPRODUCT(--(MOD(A1:C8,2)=1),A1:C8) into a blank cell, see screenshot:

doc-sum-odd-numbers1

And then press Enter key, all the odd values have been added up in the range.

doc-sum-odd-numbers1

Notes:1.To sum only the even numbers, you can use this formula: =SUMPRODUCT(--(MOD(A1:C8,2)=0),A1:C8).

2. In the above formulas, A1: C8 is the range you want to add up the odd / even numbers in.

2. Array formulas for summing odd/even numbers in a range

The following array formulas also can help you to deal with this problem.

In a blank cell, please type this formula =SUM(IF(MOD($A$1:$C$8,2)=1,$A$1:$C$8)), then press Ctrl+Shift+Enter keys together. And you will get the total of the odd numbers.

For summing the even numbers, please apply this array formula =SUM(IF(MOD($A$1:$C$8,2)=0,$A$1:$C$8)), and remember to press Ctrl+Shift+Enter keys.


arrow blue right bubble Sum odd or even rows with formulas in Excel

Sometimes, you need to sum a range of cells that locate in only even-numbered or odd-numbered rows. You can use formulas to solve it as well.

1. Supposing you have the following data, and now to sum odd rows in Column B, please input this formula =SUMPRODUCT(B2:B10,MOD(ROW(B2:B10)+0,2)) into a blank cell. See screenshot:
doc-sum-odd-numbers1

2. Then type Enter key, and all the values of odd rows have been added up.

doc-sum-odd-numbers1

Notes:

1. To sum the even –numbered rows, please use this formula =SUMPRODUCT(B2:B10,MOD(ROW(B2:B10)+1,2)).

2. In the above formulas, B2:B10 is the range that you want to use, you can modify it as your need.


Count/average/sum odd or even rows with Kutools for Excel

If you have Kutools for Excel installed, you can quickly select the odd or even rows or column, then view the calculations in status bar.

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

After free installing Kutools for Excel, please do as below:

1. Select the whole range of rows, and click Kutools > Select > Select Interval Rows & Columns. See screenshot:
doc ket 1

2. Then in the popping dialog, check Rows or Columns as you need, and type 1 into both of textbox, uncheck Select entire rows. See screenshot:doc ket 2

3. Click Ok, now all the odd rows are selected, and go to status bar, you can view the average, counting, and summing results.
doc count sum odd numbers7

Tip: If you want to count, average or sum even rows, just select all rows except first row, then apply Select Interval Rows & Columns.

Click here for details about Select Interval Rows & Columns.


Related article:

How to highlight odd or even numbers in Excel?


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

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!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    mazi · 3 years ago
    Hi this is really helpful,u help me to know many things on excel. so, i will give u many thanks.