application.Log : different results and computing time

xavnyc

New Member
Joined
Apr 26, 2010
Messages
1
Hello,
in two adjacent columns i am running the following VBA codes:
column K
With Range("d3")
Range(.Cells(1, 1), .End(xlDown)).Offset(0, 7).FormulaR1C1 = "=ln(RC[-7])"
End With
column L
Dim k As Integer
For k = 3 To dataCount
Sheets("DataProcess").Cells(k, 12).Value = Application.Log(Cells(k, 4))
Next k

i am running those into 2 adjacent columns since they are both suppose to return same results (ie LN(whatever value is in column D).
They are not returning same values. With 23.85 in column D, column K returns 3.17 amd column L 1.37.
ANy idea why?

Also, both of those loops take a really long time to run (about 5sec), whereas my loops with application.STDEV are blazing fast.

I dont get it.

Any help much, much appreciated

thanks
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Well, the most obvious answer is that you are using Application.Log instead of Application.Ln

By the way the VBA function Log is called without specifying Application as a qualifier, otherwise the spreadsheet function Log is called instead ( Log base 10 ).
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,727
Members
449,049
Latest member
MiguekHeka

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top