Signature (Visual Basic / VBA)
Public Function MedianOfThree( _
ByVal vA As Variant _
, ByVal vB As Variant _
, ByVal vC As Variant _
) As Variant
Code Example
MedianOfThree(12, 34, 56) = 34
MedianOfThree(34, 12, 56) = 34
MedianOfThree(56, 12, 34) = 34
Return Value
Function returns the median of the three numeric arguments. The median is the element in the middle of the sorted list of elements.
Notes & Version History
| vA, vB, vC | Numeric arguments those middle member is to be returned. |