Public Function GrossProfitMarginCalc( _
Optional ByVal vGrossProfitMargin As Variant _
, Optional ByVal vPrice As Variant _
, Optional ByVal vMarkupPercentage As Variant _
) As Variant GrossProfitMarginCalc(50, 35, Null) = 30
GrossProfitMarginCalc(50, Null, 30) = 35
GrossProfitMarginCalc(Null, 35, 30) = 50
GrossProfitMarginCalc(50, 35, 30) = True ' #4
GrossProfitMarginCalc(50, 40, 30) = False ' #5
IsNull(GrossProfitMarginCalc(Null, Null, 30)) = True ' #6See also: GrossProfitCalc FunctionSummary: This function solves for the argument which is missing or Null or cannot be fixed up to a number. If all arguments are numeric, then this function will return True if the arguments are consistent with the definition of Gross Profit as in example #4, and it will return False if they are not as in example #5. Function will return Null if two or more of the arguments are missing or Null or cannot be fixed up to a number as in example #6.
GrossProfitMargin = Price / (1 - MarkupPercentage / 100)
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.