**Public Function Median( _
ParamArray vValues() As Variant _
) As Variant**

**Median (middle) value of numeric arguments. **

**Examples:** Median(12, 34, 56) = 34
Median(12, 34, 56, 78) = 45
Median(SampleData) = 145

**See also:** MedianDeviation Function
Average Function
Mode Function
MedianOfThree Function
StatVarType Property
MEDIAN Function (Microsoft Excel)

**vValues:** The values that are to be processed. Can be numbers, one-dimensional numeric arrays, one-dimensional Variant arrays, one-dimensional Variant arrays with embedded arrays, or any combination of these. The current setting of the StatVarType Property determines which numeric data types are recognized by this function.

**Return value:** Function returns the median of the numeric values. The median is the element in the middle of the sorted list of elements, or the average (mean) of the two middle elements if there is an even number of elements. Function returns Null if none of the arguments are numeric.

**v1.5 Note:** This function replaces the MedianVariantVector function, which has been removed from ArrayArithmetic Class. This function is slightly different in that it examines all of the elements in the array from its lower bound through its upper bound. Copyright 1996-1999 Entisoft

Entisoft Tools is a trademark of Entisoft.