I am trying to calculate a geometric mean in a report. Access does not have a
geometric mean function. I can do it using common logarithims and
anitlogarithims, but I can only find a natural logarithim function and an exp
function that also is based on natural logs. Without going into excel, does
anybody have any suggestions?
Thanks
Chris
Krzysztof Pozorek [MVP] - 15 Jan 2008 12:40 GMT
>I am trying to calculate a geometric mean in a report. Access does not have
>a
[quoted text clipped - 4 lines]
> does
> anybody have any suggestions?
You can write own function for common logarithim (basing on natural
logarithm):
Public Function Log10(Num)
Log10 = Log(Num) / Log(10)
End Function
K.P.
Douglas J. Steele - 15 Jan 2008 12:43 GMT
Yes, the Log function returns the natural log. However, you can calculate
base-n logarithms for any number x by dividing the natural logarithm of x by
the natural logarithm of n as follows:
Logn(x) = Log(x) / Log(n)
The following example from the Help file illustrates a custom Function that
calculates base-10 logarithms:
Function Log10(X As Double) As Double
Log10 = Log(X) / Log(10#)
End Function
To get the inverse of Log10, you'd simply use the ^ operator to raise 10 to
the power of the exponent:
Function Exp10(X As Double) As Double
Exp10 = 10# ^X
End Function

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>I am trying to calculate a geometric mean in a report. Access does not have
>a
[quoted text clipped - 8 lines]
>
> Chris
crhiggins - 15 Jan 2008 13:41 GMT
Thank you for your help. It is very much appreciated.
> I am trying to calculate a geometric mean in a report. Access does not have a
> geometric mean function. I can do it using common logarithims and
[quoted text clipped - 5 lines]
>
> Chris