Skip to Content

How to use Excel ISODD Function (with Examples)

The Excel ISODD function lets you check whether the number in a given cell is odd or not. It returns TRUE or FALSE as the output:

  • TRUE when the given cell contains an odd number
  • FALSE when the given cell contains an even number

For example, suppose you are organising a baseball tournament this summer. There are a total of 22 students in your class. So, there will be two teams based on students’ roll numbers. Students whose roll numbers end with an odd digit will be placed in Team A, and the rest will be in Team B.

Refer to the following image:

How to use Excel ISODD Function (With Examples)

We can use the ISODD function to categorise students based on the last digit of their roll numbers. I have separated the last digits from the roll number in column C.

Our formula would be as follows:

=ISODD(C2)

Where the cell C2 includes the first student’s roll number.

The outputs are displayed in the following GIF.

Here, I am using conditional formatting to highlight the cells. This helps us visually analyse the students whose roll number ends with an odd digit.

Syntax

The ISODD is a simple function with the following syntax. It is mostly combined with the IF function to identify odd numbers and display a custom message.

=ISODD(value)

Where the value argument needs to be replaced with a cell reference, a direct value, or the result of another formula.

Important Notes:

  • It returns #VALUE! error if the given cell contains a non-numeric value.
  • It only considers the integer portion of the given values. If there are any decimal values, they are truncated.

How to use the ISODD Function in Excel

Download the example spreadsheet used to demonstrate the ISODD function in the upcoming section. Practice is the key to success!

Download Now

Example 1: ISODD Function Basics

Suppose you have organized a giveaway. You have chosen 10 lucky winners who will receive a smartphone or a laptop. The distribution depends on whether the last digit of their participation ID is even or odd.

  • If the last digit is odd, the participant will receive a laptop
  • If the last digit is even, the participant will receive a smartphone

Refer to the following image:

Let us add a new column and mention the reward based on the above criteria.

Here are the steps:

  • Select the cell C2
  • Type =IF
  • Choose the first option from the popup
  • Type ISODD
    (As the ISODD is a built-in function in Excel, you will see the following popup)
  • Double-click the ISODD command from the list
  • Specify the cell reference B2
  • Close the bracket for the ISODD function using )
  • Type , to move to the next argument
  • Specify “Laptop”
    (Make sure to use the double quotation marks)
  • Type ,
  • Specify “Smartphone”
    (Make sure to use the double quotation marks)
  • Complete the bracket for the IF function using )
  • Hit the Enter key

Our formula is as follows:

=IF(ISODD(B2), "Laptop", "Smartphone")

Where,

  • B2 contains the ID of the first participant
  • ISODD(B2) is the formula to identify if the participant ID is an odd number or not
  • Laptop is the desired output if the participant ID is an odd number
  • Smartphone is the desired output if the participant ID is an even number

The results are displayed in the following image.

You can use Excel’s Conditional Formatting feature to highlight the cells shown in the above image. This helps us visually analyse the type of reward each participant received.

Example 2: Highlight the cells including an Odd Number across the given Array or Range

Suppose you are planning to conduct three different exams in a day: Maths, Science, and English. Each student gets a different roll number based on the changing seat chart for every exam. Your class has 30 benches, and 10 students will be appearing for these exams.

Here’s the students’ data and roll numbers across the given exams.

Our task is to highlight the odd roll numbers in the above table.

Here are the steps:

  • Select the entire range
  • Hover over the main menu
  • Click the Home tab from the ribbon
  • Click the Conditional Formatting icon as shown below
  • Choose the New Rule option
  • You will see the following popup
  • Choose the Use a formula to determine which cells to format option
  • Enter the formula =ISEVEN(B2) as shown below
  • Click the Format button
  • You will see the following popup
  • Choose the desired color
  • Click the OK button to close the popup
  • You will be redirected to the conditional formatting dialog box as shown below
  • Click the OK button

When entering the ISODD function to highlight the formulas across the given array, make sure to specify the first cell instead of the entire range.

The results are displayed in the following image.

Example 3: Using the Data Validation and ISODD function to let users enter only odd numbers across the given range or array

Suppose that your school is conducting an exam. You plan to let the teachers assign even roll numbers to the students of their respective classes, so there will be a huge gap between students during the exam.

Here’s the class 5th students’ data:

Your task is to ensure that the teacher cannot enter even roll numbers in column B.

For this purpose, we combine the Data Validation feature in Excel with the ISODD function.

Here are the steps,

  • Select the desired range
  • Go to the Data tab
  • Click the Data Validation icon
  • You may see the following popup
  • Choose the Data Validation option from the list
  • A data validation dialog box will appear on your screen as shown below
  • Click the dropdown below the Allow option
  • Choose the Custom option from the list
  • Enter the formula =ISODD(B2)
    (Make sure to select the appropriate range as per your table)
  • Go to the Error Alert tab of the data validation dialog box
  • Enter title Invalid Entry
  • Enter error message: Roll number must be an odd number!
  • Click the OK button

The formula we entered above is as follows:

=ISODD(B2)

Where B2 is the cell where the roll number for the first student needs to be entered.

Now, whenever a teacher enters an even roll number and hits the Enter key, they will get an error, as shown in the following GIF.

Takeaway

ISODD helps you validate the contents of the given cells. It can easily determine whether a given cell contains an odd number. The function is mostly combined with the IF function to identify cells holding odd numbers and display a custom message.

I hope this article taught you all the bells and whistles of the ISODD function. Please comment below if you are stuck or encounter any particular error while using it. I will answer your questions as soon as possible.

Additional Resources:

  • Learn All Excel Information Functions (With Examples)
  • ISEVEN Function in Excel
  • IF Function in Excel
  • SEARCH Function in Excel
  • Guide to Conditional Formatting in Excel
  • SUM Function in Excel
  • SUMPRODUCT Function in Excel

Get an Office 365 Subscription to Access all the powerful Functions and Tools in Excel.