Public Function Factorial( _
ByVal vX As Variant _
) As Variant IsNull(Factorial(-1)) = True
Factorial(0) = 1
Factorial(1) = 1
Factorial(2) = 2
Factorial(3) = 6
Factorial(4) = 24
Factorial(5) = 120
Factorial(67) = 3.64711109181887E+94
Factorial(170) = 7.257415615308E+306
IsNull(Factorial(171)) = TrueSee also: Combinations Function
CombinationsWithRepetitions Function
Permutations Function
FACT Function (Microsoft Excel)vX: The number whose factorial will be returned as a Double (precision floating-point) numeric value. Function returns Null if vX is Null, cannot be interpreted as a number, or is not between 0 (zero) and 170 (the result would be greater than MaxDouble). vX is rounded down to the nearest integer. Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.