Excel-VBA: Math Functions – RND()


The RND function in MS excel returns the random number generated between two specified ranges.


As VBA Function : Int((Max – Min + 1) * Rnd + Min)

  • Max and Min
    • Mandatory
    • Type: Numbers
    • Random number gets generated between these two numbers (Max – the highest value the random number can be. Min – The smallest value the random number can be)

    Read moreExcel-VBA: Math Functions – RND()

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


The LOG function in MS excel returns the logarithm of a number to the given base.

NOTE: LOG function takes different parameters when it is used in WorkSheet and used as a VBA function.


As VBA Function : LOG(number) , default base is e = 2.71828183

In WorkSheet : LOG(number, [base])


Read moreExcel- VBA/Formula: Math Functions – LOG()