Function Units Class

FindCategory

Determines the primary physical measurement represented by an expression. Return the name of the most common physical measurement described by the measurement expression. For example, the expression "meters/seconds" (and any other expression which involves a combination of length over time) is most commonly used to represent measurements of velocity.

Signature (Visual Basic / VBA)

Public Function FindCategory( _
    ByVal vUnits As Variant _
    ) As Variant

Code Example

    estConvertFindCategory("meters") = "length"
    estConvertFindCategory("KW*hr") = "energy"
    estConvertFindCategory("second/ft") = "reciprocal of velocity"

Return Value

Function returns a string naming the primary physical measurement described by the measurement expression in the argument. Function returns Null when its argument is Null.

Notes & Version History

Arguments vUnits is a string containing the symbolic portion of a measurement expression. The measurement expression must not contain any numeric portion.
Note This function determines the physical measurement category by finding a Category-type Unit whose definition refers to the same base units with the same exponents. When no such category is found, it looks for the category of the reciprocal of the measurement expression. If it finds such a category, its name will be returned preceded by "reciprocal of ".