How to Use ISEVEN Function in Excel (2 Suitable Examples)

Get FREE Advanced Excel Exercises with Solutions!

Today I will be showing how you can decide whether a number is even or odd using the ISEVEN function of Excel. This function helps us to define even or odd numbers.

Excel ISEVEN Function


Excel ISEVEN Function Overview

Let’s start with the basic description of the ISEVEN function.

  • Function Objective:

The ISEVEN function is used to return TRUE if a number is even, otherwise returns FALSE.

  • Syntax:

The Syntax of the ISEVEN function is:

=ISEVEN(number)
  • Arguments:
ARGUMENT REQUIRED/OPTIONAL VALUE
number Required The number which we need to differentiate as EVEN or ODD. Can be any number or reference of a cell having a number.
  • Return Value:

Returns TRUE if the argument is an even number, and FALSE if the argument is an odd number.

  • Version:

The ISEVEN function was introduced in the Excel 2003 version and is available for versions after that.

  • Note:

The ISEVEN function works for all numbers including positive and negative integers, positive and negative fractions, and zero.

For example,

ISEVEN(B3)=TRUE

  • Additionally, the ISEVEN function works for blank cells (It returns TRUE for a blank cell).

  • However, the ISEVEN function does not work for arrays, even if it is an array of numbers. In the case of arrays, it will raise #VALUE! Error.


Now I will show you 2 examples of how you can use the ISEVEN function of Excel. Look at the dataset below. We have the Student IDs and Student Names of some students.

Suitable Examples of Using ISEVEN Function in Excel


1. Dividing in Groups Using the ISEVEN Function in Excel

In the first example, we will divide the students into two groups, A and B. Students with even IDs will go to group A and students with odd IDs will go to group B.

To do that, follow the steps given below.

Steps:

  • Firstly, enter the formula in Cell D5.
=IF(ISEVEN(B5),"A","B")
  • Secondly, press Enter and drag down the Fill Handle tool to autofill this formula for the rest of the cells.

Divide in Groups Using ISEVEN Function in Excel

  • Thus, all the students will be divided into 2 groups.

Excel ISEVEN Function

🔎 How Does the Formula Work?

  • In the beginning, ISEVEN(B5) returns TRUE if the number in Cell B5 is even, otherwise FALSE.
  • Then, IF(ISEVEN(B4),”A”,”B”) —-> the IF function returns “A” for a TRUE, and “B” for a FALSE.

2. Using Conditional Formatting & ISEVEN Function to Highlight Each Alternating Row

You can use the ISEVEN function of Excel to highlight each alternating row in a table in an Excel file. To do that, you have to apply the formula in Conditional Formatting, not in the Formula Bar.

Let us do it with the table in example 1.

Steps:

  • Firstly, select all the cells of the data set and go to the Home tab >> click on Conditional Formatting.

Use Conditional Formatting & ISEVEN Function to Highlight Each Alternating Row

  • Then, select the New Rule option.

  • After that, in the New Formatting Rule box, select Use a formula to determine which cells to format.
  • Next, insert this formula:
=ISEVEN(ROW(B5))
  • Then, click on Format.

Opening New Formatting Rule Box to Use Excel ISEVEN Function

🔎 How Does the Formula Work?

  • As we selected all the cells in the table (B5 to D12) before applying the formula ISEVEN(ROW(B4)), it will go to all the cells from B5 to D12 and copy the formula.
  • The ROW function will return the Row number.
  • Here, for the cells, where the formula returns a TRUE, it will apply the selected format (light ash fill), and for the cells where it returns FALSE, no format will be applied.
  • Only in the rows with even numbers, the formula returns a TRUE. Thus, the alternating rows are highlighted.
  • Now, from the Format Cells dialogue box, choose any format. Here, I choose light ash from the tab Fill.
  • Lastly, click OK.

  • Again, click OK.

  • Finally, you will find the alternating rows in the table highlighted like this.


Common Errors with Excel ISEVEN Function

Error When They Show
#Value! When the argument number is of the wrong data type, like text, array, etc.

Practice Section

In the article, you will find an Excel workbook like the image given below to practice on your own.

Practice Section


Download Practice Workbook

You are welcome to download the practice workbook from the link below.


Conclusion

Thus, you can use the ISEVEN function of Excel to check whether a number is even or odd. Do you have any problems? Feel free to ask us.


<< Go Back to Excel Functions | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Rifat Hassan
Rifat Hassan

Rifat Hassan, BSc, Electrical and Electronic Engineering, Bangladesh University of Engineering and Technology, has worked with the ExcelDemy project for almost 2 years. Within these 2 years, he has written over 250 articles. He has also conducted a few Boot Camp sessions on effective coding, especially Visual Basic for Applications (VBA). Currently, he is working as a Software Developer to develop and deploy additional add-ins to enhance the customers with a more sophisticated experience with Microsoft Office Suits,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo