ISEVEN Function

Evaluates a number as TRUE when it is an even number and FALSE when it is an odd number

Author: Himanshu Singh
Himanshu Singh
Himanshu Singh
Investment Banking | Private Equity

Prior to joining UBS as an Investment Banker, Himanshu worked as an Investment Associate for Exin Capital Partners Limited, participating in all aspects of the investment process, including identifying new investment opportunities, detailed due diligence, financial modeling & LBO valuation and presenting investment recommendations internally.

Himanshu holds an MBA in Finance from the Indian Institute of Management and a Bachelor of Engineering from Netaji Subhas Institute of Technology.

Reviewed By: Elliot Meade
Elliot Meade
Elliot Meade
Private Equity | Investment Banking

Elliot currently works as a Private Equity Associate at Greenridge Investment Partners, a middle market fund based in Austin, TX. He was previously an Analyst in Piper Jaffray's Leveraged Finance group, working across all industry verticals on LBOs, acquisition financings, refinancings, and recapitalizations. Prior to Piper Jaffray, he spent 2 years at Citi in the Leveraged Finance Credit Portfolio group focused on origination and ongoing credit monitoring of outstanding loans and was also a member of the Columbia recruiting committee for the Investment Banking Division for incoming summer and full-time analysts.

Elliot has a Bachelor of Arts in Business Management from Columbia University.

Last Updated:December 3, 2023

What is the ISEVEN Function?

The ISEVEN function in Excel evaluates a number as TRUE when it is an even number and FALSE when it is an odd number.

Let’s agree that working on thousands of rows of data is not an easy task. There is a high probability of making errors, even if it is as simple as determining whether the numbers are odd or even.

What can be done then?

Well, this is where we will be using the function! The function will determine whether the number is even or odd depending on the number you input, thus simplifying your job exceptionally.

You can further use the conditional formatting tool and the IF statements to input multiple criteria based on even numbers and return the desired result.

In this article, we will see the function, understand the syntax, and work on a couple of examples.

Key Takeaways

  • The function evaluates whether the referenced number is even and returns the result as a boolean value TRUE, whereas if it is odd, the result is FALSE.
  • You can combine the function with other logical functions, such as IF statements, which helps to return two different customized results based on the boolean values. 
  • The function will return a #VALUE! Error if you input a non-numeric value as an argument.
  • Suppose you input decimal numbers, then all the digits after the decimal point are ignored. Only the digits before the decimal point are considered for evaluating whether the number is even or not.
  • Since dates are represented as serial numbers, the function has a similar effect on dates as those on numerical values.
  • The function that works exactly opposite to ISEVEN is the ISODD number that evaluates odd numbers as TRUE.

ISEVEN Function Formula

The function is categorized as an Information function that returns TRUE for even numbers by simply referencing or hardcoding the numerical values.

Generally, whenever the function evaluates a numerical value and finds it to be an even number, the result returned is a boolean value equal to TRUE.

For example, if you have three numbers, 23, 48, and 64, and use the function on those numbers, the result you would get for each would be FALSE, TRUE, and TRUE, respectively.

The function only accepts numerical values or numbers returned from formulas. For example, if the formula is =IF(25>30,25,30), the result would be either 25 or 30 based on the inputs.

Irrespective of the result, the function would be able to evaluate either number and hence return the corresponding result as a boolean value.

However, when you reference a non-numeric value such as a ‘text string,’ the function determines it to be unacceptable and returns a #VALUE! Error.

The formula is:

=ISEVEN(number)

where,

number - (required) the reference to the numerical value which we want to evaluate

Hence, you can quickly determine if you have an even number with just a single input.

How to use the ISEVEN Function in Excel?

There are two methods to use the function: from the function's library or a worksheet formula.

In this section, we will explore both methods, and then you can decide what works best for you. However, before proceeding, remember that each method has its pros and cons.

Method #1: From the function’s library

Not necessarily a beginner's tool, but if you use the function's from the library, Excel will provide you with all the guidance on what argument you need to input preview for the result or any other help required.

To use the function from the library, please follow the steps below:

1. First, select the cell in which you intend to get the result.

Formulas Tab

2. Click on Formulas > More Functions > Information > select the ISEVEN function from the drop-down menu.

3. This will open up the dialog box, as illustrated:

 dialog box

4. Here, you can directly reference the cell that contains a number or hardcode the value in the input box.

Once you input the argument in the dialog box, you will get a preview of the result, as illustrated below:

Input and result in the dialog box

5. We get the result as 1, i.e., a boolean value equal to TRUE. The second place where you would find the result is above 'Help on this function in the bottom left corner of the dialog box, which gives the result as Formula result = TRUE.

6. However, if you click OK, you will get the boolean value as TRUE and not as 1.

Result in the selected cell

Method #2: As a worksheet formula

The pros of using a function as a worksheet formula outweigh its cons. Ask any Excel wizard about the best way to use the functions, and they would suggest using it as a formula.

And it's not even rocket science.

To use the function as a formula, we will begin with an equal sign, type in the function name, and input the argument in parentheses.

Suppose you have numbers in Excel, as illustrated below:

Using the function as a worksheet formula

To check whether the numbers are even or odd, we will use the formula =ISEVEN(B3) in cell C3 and drag it down to cell C6 to give us the result:

Result for ISEVEN formula

From the numbers, we get the result for 4, 8, and 12 as TRUE, i.e., they are divisible by 2, while we get the result as FALSE for the number 5.

ISEVEN Function Example

You would get a boolean value when you input a numerical value as an argument for the function. But what about the dates or the decimal numbers, which are neither even nor odd?

What effect would the function have on text strings?

This section will answer all those questions based on a few examples.

a. Dates

A date value is also represented as a serial number in Excel beginning from 1st January 1900, whose serial number is equal to 1.

Back to the future, if the date today is equal to 20th August 2022, its equivalent serial number would be 44793.

Since all these serial numbers are natural numbers, the function has a similar effect on date as any other numerical value.

Suppose you have data in Excel, as illustrated below:

Dates as values for ISEVEN function

Using the formula =ISEVEN(B3) in cell C3 and dragging it down to cell C6, we get the result:

Result for date values using formula

However, it isn't easy to interpret the date values in mm-dd-yyyy format. So what else can you do?

We prefer the keyboard shortcut of the Ctrl + ~ key, which gives us the corresponding serial numbers for the date values.

Dates as serial numbers

Since serial numbers 44794 and 44796 are even numbers, we get the result as the boolean value equal to TRUE.

b. Decimal Numbers

The function behaves in a rather unusual manner when you input decimal numbers inside the function.

Suppose you have the number 26.231654; the function will ignore all the digits after the decimal and judge whether the number is even or odd only based on the number before the decimal point.

The jargon term for this phenomenon is called 'truncation'.

Let's say that you have the numbers as illustrated below:

Decimal numbers as values for function

Using the formula =ISEVEN(B3) in cell C3 and dragging it down to cell C6, we get the result:

Result for decimal values using formula

Even though the number is 4.56487, which is not divisible by 2, the function ignores all the numbers after the decimal point and judges solely based on 4, divisible by 2. 

Hence the result returned is a boolean value that is equal to TRUE. The same is the case with the numerical value 654.6567.

c. Text Strings

Perhaps we have mentioned this before and need no explanation that when you input a text string as an argument, Excel will return a #VALUE! Error.

Suppose the data looks as illustrated below:

Text strings as values

To find the effect of the function on the below values, we will use the formula =ISEVEN(B3) in cell C3 and drag it down to cell C6 to get the result:

Result for text strings using formula

Whenever we had a text string as a value, the function identified that it was not an acceptable value and returned a #VALUE! Error.

On the other hand, wherever we had numbers, the function normally evaluated them as odd or even in terms of the boolean value of TRUE or FALSE.

ISEVEN And other functions

A function that works well with the function is the IF statement. The IF statement allows the users to input specific criteria and returns different values based on whether the requirements are met or not.

a. IF statement

You can use an IF function to return customized text strings, numbers, or even boolean values whenever an even number is detected.

Suppose you have some numbers in Excel, as illustrated below:

IF function

To return a customized result, we will use the formula =IF(ISEVEN(B3),"Even Number","Odd Number"), which gives the result:

Result for IF

How does the formula work?

Firstly, the function evaluates the number if it's even. If the result is equal to TRUE, then the IF function catches the boolean value and returns the corresponding customized message, i.e., 'Even Number.'

b. ROW function

The ROW function in Excel will return the row number for the referenced cell or range of cells.

If you want to add the same value in all the even-numbered cells, the formula would be, 

=IF(ISEVEN(ROW(C1:C10)),"Even Row","") 

It will give you the following result in even-numbered rows:

ROW

Another way you can use the ROW and ISEVEN functions are with the conditional formatting tool.

We find the 'formula to determine cell format' extremely useful in highlighting the required data, whether it's even numbered rows or not.

To use the conditional formatting tool, first and foremost, select the cells upon which we want the tool to work.

Use the keyboard shortcut Alt + H + L + N and click on 'Use a formula to determine which cells to format.'

Conditional Formatting Tool

Here, we will use the formula =ISEVEN(ROW(B1:B10)) and select the appropriate fill color, as illustrated below:

Formula in Conditional Formatting Tool

After we click on Ok, the expected result is to find all the even-numbered rows highlighted in our selected cells.

Result for conditional formatting tool

And that is precisely the result we get.

ISEVEN vs. ISODD

The ISODD function is categorized as an Information function that works exactly opposite to ISEVEN, i.e., it evaluates to TRUE if the number is odd and FALSE if the number is even.

If you have a lot of odd numbers in the spreadsheet that you need to identify, then you can quickly identify them using the ISODD function.

For example, suppose the three numbers are 273, 155, and 268. If you use the function on these three numbers, then you would get the resulting boolean values TRUE, TRUE, and FALSE, respectively.

Similar to the function, the ISODD function accepts all the numerical values, even those returned from logical formulas, to determine whether they are odd or not.

However, the only exception is the text strings, boolean values, and error values, which are deemed unacceptable 'values', making the function return a #VALUE! Error.

The syntax for the function is:

=ISODD(number)

where,

number - (required) the reference to the numerical value which we want to evaluate

Suppose you have some numbers in Excel, as illustrated below:

Example for ISODD function

To evaluate whether the numbers are odd, we will use the formula =ISODD(B3) in cell C3 and drag it down to cell C6 to get the result.

Result for ISODD function

For the numbers 1 and 7, we get the result as TRUE, meaning both these numbers are not divisible by 2. On the other hand, since 2 and 10 are divisible by 2, we get the result as FALSE, i.e., they are even numbers.

VBA Code to evaluate the even numbers

In this final section of the article, we have an easy macro where you need to input numbers in the first column of 'Sheet1,' and the macro automatically tells whether they are even or not.

Illustrated below is a VBA code that identifies all the even numbers and gives you the result as a boolean value TRUE.

Now, all you need to do is input the numbers in Column A of 'Sheet1', where the number automatically captures whether it is even or odd.

Result for VBA code

As this macro applies only to the 'Sheet1,' you must write the VBA code in 'Sheet1'. You click on the 'Sheet1' in the VBA project, which would open up the adjoining code editor.

VBA Project window

Next, select 'Worksheet' instead of General in the VBA code writer window and 'SelectionChange' from the adjoining drop-down.

If you see the beginning of the code as 'Private Sub Worksheet_SelectionChange(ByVal Target as Range),' you have made the right choices so far!

Finally, type in the code in the window, save the workbook as a macro-enabled workbook, and return to the 'Sheet1.'

Type in the different numbers, and you will get the required result. Of course, you can further modify the VBA code to return customized text strings too!

Researched and authored by Akash Bagul | LinkedIn

Reviewed and edited by Parul Gupta | LinkedIn

Free Resources

To continue learning and advancing your career, check out these additional helpful WSO resources: