Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

Excel– VBA/Formula: Math Functions – LOG()


The LOG func­tion in MS excel returns the log­a­rithm of a num­ber to the given base.

NOTE: LOG func­tion takes dif­fer­ent para­me­ters when it is used in Work­Sheet and used as a VBA function.


As VBA Func­tion : LOG(num­ber) , default base is e = 2.71828183

In Work­Sheet : LOG(num­ber, [base])


  • Num­ber
    • Manda­tory
    • Type: Num­ber
    • Num­ber for which log­a­rithm needs to be calculated
  • base (Needed only when used as VBA function)
    • Optional
    • Type: Num­ber
    • Input pro­vided here is con­sid­ered to be the base .
    • Default Value: 10 (Base 10 is default)


Function getLOG()

Dim number1

Dim number2

number1 = 20

number2 = 10

strResult = "The Log of " & number1 & " And " & number2 & " are " & Log(number1) & " and " & Log(number2) & " respectively"

MsgBox strResult

End Function
LOG() - Functions

LOG() — Functions

Using Log() as Excel Formula

LOG() Formula

LOG() For­mula


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: