Note: Excel has spreadsheet functions (e.g., Log10) and VBA functions (e.g.
, Log), and both
have different syntaxes.
To access the spreadsheet functions, use:
Therefore, for Log10: Argument = Number
For VBA functions:
By the way, the VBA Log function is a logarithm to the base e. Therefore, if you want to
get the log for a different base, use the change base property for logarithms:
log 𝑎 𝑥
log 𝑏 𝑥 =
log 𝑎 𝑏
Therefore, if we want to convert the base from e to 10, then:
ln 𝑥
log 𝑥 =
ln 10
In VBA format:
Note: Please research the syntax first before writing the code. Please use google incessantly.