EVEN Function (Table of Contents)
EVEN Function in Excel
In our childhood, our math teacher taught us about the basics of mathematics. One of those basic concepts is EVEN numbers in mathematics.
Technology made us not to remember all those functions instead allow us to use them in software practically. In MS Excel EVEN, a function is a built-in function that “converts the given number to the nearest even number”. The formula =EVEN (32.1) would return a value of 32.
Rounding up any number manually is a time-consuming task. It allows us to just sit back and save tons of time by just applying the formula.
EVEN Formula in Excel
Below is the EVEN Formula in Excel :
EVEN Formula includes only one argument.
- Number: It is the required parameter and converts the supplied number to the nearest even number.
How to Use EVEN Function in Excel?
This is very simple and easy to use. Let understand the working of EVEN Function in excel by some example.
In this example, Convert the below-given numbers to the nearest EVEN number. Enter these numbers from A2:A8 and
And apply the even formula in cell B2.
Now drag and drop the formula to remaining cells.
Now, look at each example one by one.
- Firstly the value we are converting is 5.1 and the nearest EVEN integer value is 6. It cannot be 4 because the difference between 5.1 and 4 is (5.1 – 4 = 1.1) 1.1 but the difference between 5.1 and 6 is (5.1 – 6 = 0.9) 0.9. So the closest EVEN integer number is 6.
- The same logic applies to the second one as well.
- For the third value, a negative even number for -3.1 is 4. The nearest integer EVEN number is 4, not 2.
- The fourth one is -0.39 here the first ever EVEN number is -2. Therefore, the formula has returned -2 as the result.
Like this EVEN formula round up the given number to the nearest EVEN number.
4.8 (2,146 ratings)
In this example, Find all the EVEN numbers from the below list and count how many EVEN numbers are there in the list.
We can find the total number of EVEN numbers in the by using EVEN formula and COUNTIF formula.
Step 1: Check each number whether is it is EVEN or ODD.
Result is :
If it is EVEN number show as TRUE.
If it is ODD number show as FALSE.
The formula is checking whether the value in cell A2 is equal to the closest EVEN number. If it is equal it will return TRUE, if it is not equal it will return FALSE.
Step 2: Apply COUNTIF formula in cell D3 to get the total count of TRUE, which is representing EVEN numbers in the list.
Here COUNTIF formula counts all the TRUE values in the range B2: B18 and return the total count of all the TRUE values. The total number of TRUE values in the range B2: B18 is 9. That means there are 9 EVEN numbers are there in the list.
In this example, From the below passengers data if the ticket number is EVEN number then schedule them at 10:00 PM flight. If the ticket number is an ODD number then schedule them at 11:00 PM flight.
Now enter this data in excel and start following the below steps to allocate flight to either 10:00 PM or 11:00 PM.
Check if the ticket number is equal to EVEN number show as “10:00 PM Flight” or else “11:00 PM Flight”.
Firstly by using the logical function IF condition, we are checking whether the ticket number is equal to an EVEN number. If the first supplied condition is true the result will be shown as “10:00 PM Flight” or else “11:00 PM Flight”.
EVEN Function in VBA
In VBA, also we can use EVEN function. The procedure to use this function is as below.
Dim Result as String
Result = Application.Worksheetfunction.Even(51.36)
If you run the above code message box will show you the result as 52.
Things to Remember About the EVEN Function in Excel
- It can be applied to a single cell, not for range of cells. If you apply it for more than one cell, it will consider only the first cell as its reference. Look at the below example we have selected two numbers but it is showing the even number only for the number 75 and 76 is the nearest EVEN number.
Result is :
- It can be applied only for a series of numbers. If it is applied to other than numbers, it will throw the error as #VALUE!.
The result will be :
- If the number is exactly in between the two EVEN numbers, a function always rounds up the number and show the result. It will never round down the value. In the below example the supplied number is 55.
In this case, the result will be 56, not 54.
- For this, we can directly enter the number for the parameter, need not specify the cell reference.
- For positive numbers, it always rounds up but for negative numbers, it will round down but the more negative, it will be.
Result is :
This has been a guide to EVEN Function. Here we discuss the EVEN Formula and How to use EVEN Function along with an example and downloadable excel template. You may also look at these useful functions in excel –