<-- Previous || Up || Next -->

Percent Change Function
Math Reals Class

Public Function PercentChange( _
      ByVal vX As Variant _
    , ByVal vY As Variant _
    ) As Variant

Percent increase of Y over X.

Examples:
    PercentChange(4, 12) = 200
    PercentChange(4, 8) = 100
    PercentChange(4, 6) = 50
    PercentChange(4, 2) = -50
    PercentChange(4, 1) = -75
    PercentChange(4, 0) = -100
See also:
    PercentChangeVerify Subroutine
    Percent Function
    PercentOfTotal Function
vX: The starting/original number. Function returns Null if vX is Null or cannot be fixed up to a number.

Function returns Null if vX is 0 (zero).

vX: The ending/final number. Function returns Null if vY is Null or cannot be fixed up to a number.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.