Public Function GrossProfitCalc( _ Optional ByVal vGrossProfit As Variant _ , Optional ByVal vUnitsSold As Variant _ , Optional ByVal vProductionCost As Variant _ , Optional ByVal vSalePrice As Variant _ ) As Variant
GrossProfitCalc(Null, 125, 34, 50) = 2000 GrossProfitCalc(2000, Null, 34, 50) = 125 GrossProfitCalc(2000, 125, Null, 50) = 34 GrossProfitCalc(2000, 125, 34, Null) = 50 GrossProfitCalc(2000, 125, 34, 50) = True ' #5 GrossProfitCalc(2000, 125, 34, 49) = False ' #6 IsNull(GrossProfitCalc(Null, 125, Null, 50)) = True ' #7See also:
GrossProfitMarginCalc Function NetProfitCalc 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 #5, and it will return False if they are not as in example #6. 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 #7.
GrossProfit = UnitsSold * (SalePrice - ProductionCost)
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.