How to use ISEVEN and ISODD functions in Excel
Identifying even and odd numbers may be easy in small groups of data, but with large amounts of data it is different. Luckily, Excel provides two built-in functions, ISEVEN and ISODD, to simplify this task.
What is the ISEVEN function in Microsoft Excel?
The ISEVEN function checks whether a number is even or odd. When you provide it with a numeric value or cell reference as input, it returns TRUE if it is even and FALSE if it is odd. ISEVEN will return a #VALUE error if the value is non-numeric. ISEVEN ignores decimal values and considers only the integer or whole part of numeric values.
The syntax for ISEVEN is:
=ISEVEN(value)
Where value is the numeric value you want to check.
What is the ISODD function in Microsoft Excel?
The ISODD function has similar functionality to the ISEVEN function in Excel but returns opposite results. The ISODD function will return TRUE if the number is odd and FALSE if it is even.
If the input is not a number, it will generate a #VALUE error. Similar to ISEVEN, ISODD does not consider decimal values; evaluates only the integer part.
The syntax for this Excel Function is:
=ISODD(value)
Where value is the number you want to check.
How to use the ISEVEN function in Excel
Start from the simplest way to use the ISEVEN function as follows: Open the spreadsheet, determine the number you want to check, then follow these steps:
1. Select the formula input box. Here is B1 .
2. In the formula bar, enter:
=ISEVEN (A1)
3. Press Enter .
In this formula, ISEVEN checks whether the value in cell A1 is even or odd and returns TRUE or FALSE in cell B1. Because 1 is not an even number, this formula returns FALSE in cell A1 . To see the results for the remaining columns, drag the autofill bar, then drop it on the cells below.
How to use the ISODD function in Excel
You can use the ISODD function to check whether a numeric value is odd in the same way as the ISEVEN function.
1. Select the cell where you want to enter the formula. Here is B1 .
2. In cell B1 , enter the formula below.
=ISODD(A1)
3. Press Enter .
Excel will look at the value in cell A1 and check to see if the value is an odd number. If that value is an odd number, the formula returns TRUE in cell B1 . Drag the autofill bar and drop it into the rest of those cells to see the results.
Actual use case of ISEVEN and ISODD functions
You can use the Excel functions ISEVEN and ISODD in many cases. The most common example is grouping students based on ID.
In this case, you have 6 students and want to divide them into teams based on ID. The goal here is to place students with odd ID numbers on Team A, and students with even numbers on Team B.
To achieve this, you can use a combination of ISEVEN or ISODD using the IF function in Excel.
The syntax for this IF function is:
IF(logical_test, value_if_true, [value_if_false])
Where logical_test is the conditional statement, value_if_true is the result if the statement is true, and value_if_false is the result displayed if the statement is false.
Using the IF function, you can easily group students using the formula below:
=IF(ISODD(B3),"Team A", "Team B")
In this formula, ISODD checks whether the student ID in cell B3 is even or odd. If it is odd, ISODD returns TRUE, and the student is assigned to Team A. Otherwise, they are assigned to Team B.
Another use case for ISEVEN and ISODD is to create alternating colors. For example, you can use Excel conditional formatting with these two functions to highlight each row or column.
By using the ISODD and ISEVEN functions in Excel , you can easily identify even and odd values in a group of data. These functions work the same but give different results. Therefore, the choice to use depends on the structure of the formula and whether the result you want is TRUE or FALSE.
You should read it
- Basic Excel functions that anyone must know
- How to use Hlookup function on Excel
- How to use the SUM function to calculate totals in Excel
- How to use the LEN function in Excel
- How to use the WRAPROWS function in Excel
- ISODD function - The function returns True if the value is an odd number in Excel
- How to use the MOD function and QUOTIENT function in Excel
- How to use the NPER function in Excel to plan loans and savings
- How to use COUNTIF function on Excel
- How to use MID functions to get strings in Excel
- How to fix the SUM function doesn't add up in Excel
- How to use Excel's VALUE function