ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Natural log function (https://www.excelbanter.com/excel-programming/385255-natural-log-function.html)

Mitch

Natural log function
 
I am trying to use the Ln (natural log) function in a cell formula produced
by VBA. The compiler tells me that the Ln function is not defined. Below is
my code. Any suggestions?
If EarlyTrendType = "Logarithmic" Then
Cell.Value = ActiveSheet.Range(L1).Value * Ln(Cell.Offset(0,
-2).Value) + _
ActiveSheet.Range(L2).Value
End If
Note that L1 & L2 are the cell address' for the regression coefficients
produced by Linest().

merjet

Natural log function
 
Use one of these:
Application.Worksheetfunction.Ln()
Application.Ln()
Log()

Merjet





All times are GMT +1. The time now is 07:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com