Logarithm is different using VBA and Excel function

后端 未结 2 757
轻奢々
轻奢々 2020-12-06 20:05

I\'m trying to get the log of a number but it looks like the Worksheet function gives one answer, and VBA another.

In VB, using Log(Range(\"A2\")) where

2条回答
  •  甜味超标
    2020-12-06 20:23

    VBA's Log function is the natural log. If you want log base ten you will have to use the logarithmic identity for converting bases. Like so: Log(x)/Log(10).

提交回复
热议问题