Dim natLog As Double
natLog# = Log(18) ' Assigns 2.89037175789617
' Compute the base 10 logarithm of a number.
Function Log10 (inVal As Single) As Single
Log10 = Log(inVal!) / Log(10)
End Function
Print Log10(10) ' Output: 1
Print Log10(100) ' Output: 2
Print Log10(1 / 100) ' Output: -2
Print Log10(1) ' Output: 0