**EVEN Function (Table of Contents)**

## EVEN Function in Excel

EVEN Function converts any Odd number or any number into the nearest even number. The selected number can be a whole number or in decimal. Important thing is, if we feed an even number then it will not be changed and it only considers numbers.

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

#### Example #1

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.

#### Example #2

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.

#### Example #3

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.

Sub EVEN_Function_Example

Dim Result as String

Result = Application.Worksheetfunction.Even(51.36)

Msgbox Result

End Sub

If you run the above code message box will show you the result as 52.

### Things to Remember

- 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 :

### Recommended Articles

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 –