Signature (Visual Basic / VBA)
Public Function Quartile( _
ByVal vQuartile As Variant _
, ParamArray vValues() As Variant _
) As Variant
Code Example
Quartile(0, 12, 34, 56) = 12
Quartile(1, 12, 34, 56) = 23
Quartile(2, 12, 34, 56) = 34
Quartile(3, 12, 34, 56) = 45
Quartile(4, 12, 34, 56) = 56
Quartile(0, 12, 34, 56) = Minimum(12, 34, 56)
Quartile(2, 12, 34, 56) = Median(12, 34, 56)
Quartile(4, 12, 34, 56) = Maximum(12, 34, 56)
Parameters
| Parameter | Description |
|---|---|
| vQuartile | The quartile whose corresponding value will be returned. Must be between 0 and 4 inclusive. vQuartile is truncated to an integer. |
| vValues | The values that are to be examined. 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 value from vValues whose quartile is vQuartile, or it will use interpolation to determine a value if there is no value whose quartile is vQuartile. Function returns Null if none of the vValues arguments are numeric, or if vQuartile is not between 0 and 4 inclusive.