How do I get a natural logarithm, Access forms, it's LN in excel

G

Guest

Examples from Excell:

=exp(LN(.5)*(22)/15)

=POWER(10,LOG(.5)*(22)/B3)

How do I enter this in a text box on an Microsoft Access form?
 
D

Douglas J. Steele

It's Log in Access.

From the Help file:

Log function

Returns a Double specifying the natural logarithm of a number.

Syntax

Log(number)

The required number argument is a Double or any valid numeric expression
greater than zero.

Remarks

The natural logarithm is the logarithm to the base e. The constant e is
approximately 2.718282.

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 illustrates a custom Function that calculates base-10
logarithms:

Static Function Log10(X)
Log10 = Log(X) / Log(10#)
End Function
 
G

Guest

Thanks for the quick reply.

I still need a little help, can you put the example into the eaxct way I
would enter it in Access

=exp(LN(.5)*(22)/15)
=POWER(10,LOG(.5)*(22)/15)
The answer is from Excel for both of the methods is .361817
 
D

Douglas J. Steele

Well, =Exp(Log(.5)*22/15) gives 0.361817309360095

Log(.5) in Excel is the logarithm base 10. The Help file In Access mentions
the following.

The natural logarithm is the logarithm to the base e. The constant e is
approximately 2.718282.

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 illustrates a custom Function that calculates base-10
logarithms:

Static Function Log10(X)
Log10 = Log(X) / Log(10#)
End Function, to get the

That means that to get the equivalent of Log(.5) in Excel, you'd need to use
(Log(.5)/Log(10#)) in Access. As well, Access doesn't have a Power function,
but all Power does is raise the first argument to the second argument, so
you can use a^b instead of Power(a, b)

In other words, the equivalent of POWER(10,LOG(.5)*(22)/15) in Access would
be 10#^((Log(.5)/Log(10#))*22/15) (You need the # there to ensure double
precision accuracy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top