# How to Count Cells with Odd Numbers using Excel Functions

In this article, we will discuss how to count cells with odd numbers using Excel functions.

Suppose you have a dataset in Excel and you want to count the number of cells that contain odd numbers. How do you do it? You could manually go through each cell and count them, but that would be time-consuming and error-prone. The solution is to use Excel functions to automate the process.

## The Solution

Excel offers several functions that you can use to count cells based on specific criteria. In this article, we will discuss five methods for counting cells with odd numbers. These methods are:

• Using the COUNTIF Function
• Using the SUMPRODUCT Function
• Using the IF and MOD Functions
• Using the DCOUNT Function
• Using the FILTER Function

## Method 1: Using the COUNTIF Function

The COUNTIF function counts the number of cells in a range that meet a specific criterion. To count cells with odd numbers, you can use the following formula:

``=COUNTIF(range,"=MOD(cell,2)=1")``

In this formula, range is the range of cells you want to count, and cell is a cell reference within that range. The MOD function returns the remainder of a division operation. In this case, MOD(cell,2) will return 1 if the cell contains an odd number.

## Method 2: Using the SUMPRODUCT Function

The SUMPRODUCT function returns the sum of the products of corresponding ranges or arrays. To count cells with odd numbers, you can use the following formula:

``=SUMPRODUCT(--(MOD(range,2)=1))``

In this formula, range is the range of cells you want to count. The — operator converts the Boolean values returned by the MOD function to 0 or 1.

## Method 3: Using the IF and MOD Functions

The IF function returns one value if a condition is true and another value if it is false. To count cells with odd numbers, you can use the following formula:

``=SUM(IF(MOD(range,2)=1,1,0))``

In this formula, range is the range of cells you want to count. The IF function checks whether the remainder of the cell divided by 2 is equal to 1. If it is, it returns 1, otherwise, it returns 0. The SUM function then adds up the results.

## Method 4: Using the DCOUNT Function

The DCOUNT function counts the cells in a database that meet a specified criteria. To count cells with odd numbers, you can use the following formula:

``=DCOUNT(database,field,"MOD(field,2)=1")``

In this formula, database is the range of cells that contain the data you want to count, field is the column or row you want to count, and “MOD(field,2)=1” is the criteria you want to use. This criteria will count cells where the remainder of the cell divided by 2 is equal to 1.

## Method 5: Using the FILTER Function

The FILTER function returns an array of values that meet a specified condition. To count cells with odd numbers, you can use the following formula:

``=COUNT(FILTER(range,MOD(range,2)=1))``

In this formula, range is the range of cells you want to count. The FILTER function returns an array of cells that meet the condition MOD(range,2)=1. The COUNT function then counts the number of cells in that array.

Thank you.

## Bibek Sapkota

I'm Bibek | Tech Enthusiast & Lifelong Learner. | Playing on the Web for the Past Few Years as an SEO Specialist and Full-Time Blogger. I'm constantly seeking out new opportunities to learn and grow, and I love sharing my knowledge with others. This is where I started this blog! Here, you will find me sharing comprehensive reviews, helpful guides, tips-tricks and ways to get the full benefits of evolving technology. On this blog, you can also explore Powerful Knowledge, Tips & Resources On Blogging, SEO and Passive income Opportunities.