WorksheetFunction.Even Method

Returns number rounded up to the nearest even integer. You can use this function for processing items that come in twos. For example, a packing crate accepts rows of one or two items. The crate is full when the number of items, rounded up to the nearest two, matches the crate's capacity.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Even ( _
    Arg1 As Double _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Double
Dim returnValue As Double

returnValue = instance.Even(Arg1)
double Even(
    double Arg1
)

Parameters

Return Value

Type: System.Double

Remarks

If number is nonnumeric, Even returns the #VALUE! error value.

Regardless of the sign of number, a value is rounded up when adjusted away from zero. If number is an even integer, no rounding occurs.

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace