The EVEN function in Google Sheets rounds a given number up to the nearest even number. It works with both positive and negative numbers.
Syntax
EVEN(value)
Where value
is the number to be rounded up to the nearest even number.
Using EVEN with Positive Numbers
Let’s explore how the EVEN function behaves with positive numbers.
The function rounds the numbers in column A to the next greatest even number.
Example:
Value | Formula | Result |
21 | =EVEN(A2) | 22 |
11.4 | =EVEN(A3) | 12 |
2 | =EVEN(A4) | 2 |
If the input is already an even number, the EVEN function will return the same value.
Working with Multiple Numbers
The EVEN function is not an array formula by default, but it supports the ArrayFormula function.
If you want to round multiple numbers to the nearest even numbers using a single formula, use:
=ArrayFormula(EVEN(A2:A6))
Replace A2:A6 with the desired range.
This formula replaces individual EVEN formulas for each cell.
If the input value is 0 or blank, the result will also be 0.
Using EVEN with Negative Numbers
For negative numbers, the EVEN function rounds down to the next negative even number with a greater absolute value.
Example:
Value | Formula | Result |
-3 | =EVEN(A2) | -4 |
-9.25 | =EVEN(A3) | -10 |
-2 | =EVEN(A4) | -2 |
Additional Tips
Populating a Sequence of Even Numbers
To generate a sequence of even numbers, such as 2, 4, 6, …, 20, you can use any of the following methods:
1. Using the EVEN + ROW + UNIQUE Combination
=ArrayFormula(UNIQUE(EVEN(ROW(A1:A20))))
This formula returns the first 10 even numbers in chronological order.
2. Using the SEQUENCE Function
=SEQUENCE(10, 1, 2, 2)
This generates the first 10 even numbers in a single column.
3. Using the MAKEARRAY Function
=UNIQUE(MAKEARRAY(20, 1, LAMBDA(r, c, EVEN(r))))
This creates a unique sequence of even numbers.
Using EVEN with the FILTER Function
You can use the EVEN function to filter rows based on even numbers in a column.
Example:
To filter rows in A2:C where values in column C are even numbers, use:
=FILTER(A2:C, C2:C=EVEN(C2:C))
The formula evaluates whether the values in C2:C are even and filters rows accordingly.
Alternatively, you can use the ISEVEN function for a similar result:
=FILTER(A2:C, ISEVEN(C2:C))
That’s everything you need to know about the EVEN function in Google Sheets. Experiment with these examples to better understand its functionality!