How to Use ISEVEN Function in Excel (2 Examples)

Quick view of Excel ISEVEN Function

Today I will be showing how you can decide whether a number is even or odd using the ISEVEN function of Excel.

Excel ISEVEN Function (Quick View)

Quick view of Excel ISEVEN Function

 

Download Practice Workbook

Excel ISEVEN Function: Syntax and Argument

Summary

  • Returns TRUE if a number is even, otherwise returns FALSE.
  • Available from Excel 2003.

Syntax

Syntax of the ISEVEN Function

The Syntax of the ISEVEN function is:

=ISEVEN(number)

Argument

Argument Required or 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.

Note:

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

For example, ISEVEN(-2.1666)=TRUE

ISEVEN Function with Negative Fractions

  • The ISEVEN function even works for blank cells (It returns TRUE for a blank cell).

ISEVEN with Blank Cell

  • 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.

ISEVEN Function with Arrays

Return Value

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

Excel ISEVEN Function: 2 Examples

Now I will show you 3 examples of how you can use the ISEVEN function of Excel.

1. Dividing a Group of Students into Two Sections Using ISEVEN Function

Look at the data set below. We have the Student IDs and Student Names of some students of Sunshine Kindergarten.

Data Set for ISEVEN Function

Now 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.

Enter this formula in the first cell:

=IF(ISEVEN(B4),"A","B")

Then double click on the Fill Handle to fill the rest of the cells.

Dividing into Two Groups Using the ISEVEN Function of Excel

Explanation of the Formula

  • ISEVEN(B4) returns TRUE if the number in cell B4 is even, otherwise FALSE.
  • IF(ISEVEN(B4),"A","B") returns “A” for a TRUE, and “B” for a FALSE.
  • Same for the rest of the cells.
Formula Output Explanation
IF(ISEVEN(B4),”A”,”B”) B First returns a TRUE if the number in cell C4 is even, otherwise returns a FALSE. Then returns “A” for a TRUE, and “B” for a FALSE.

2. Using ISEVEN Function to Highlight Each Alternating Row (Creating Zebra Striping)

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.

Select all the cells of the data set and go to Home>Conditional Formatting>New Rule from Excel Toolbar.

Conditional Formatting in Excel

Then in the New Formatting Rule box, select Use a formula to determine which cells to format. And then insert this formula:

=ISEVEN(ROW(B4))

New Formatting Rule Box in Excel

Then click on Format. Then from the Format Cells dialogue box, choose any format.

I choose light ash from the tab Fill.

Format Cells Box

Then click OK.

You will find the alternating rows in the table highlighted like this.

Alternating Rows Highlighted Using ISEVEN Function

Explanation of the Formula

  • As we selected all the cells in the table (B4 to D20) before applying the formula ISEVEN(ROW(B4)), it will go to all the cells from B4 to D20 and copy the formula.

For example, in cell C4, it will apply the formula ISEVEN(ROW(C4)), in cell D4 it will apply the formula ISEVEN(ROW(D4)) and so on.

  • 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.

Common Errors with the Excel ISEVEN Function

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

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.


Further Readings

Rifat Hassan

Hello! Welcome to my profile. Here I will be posting articles related to Microsoft Excel. I am a passionate Electrical Engineer holding a Bachelor’s degree in Electrical and Electronic Engineering from Bangladesh University of Engineering and Technology. Besides academic studies, I always love to keep pace with the revolution in technology that the world is rushing towards day by day. I am diligent, career-oriented, and ready to cherish knowledge throughout my life.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo