The VBA Sqr function returns the square root of a number.
Sqr(number)
Using the Round function to calculate the square root of a number.
Sub SqrExample() MySqr = Sqr(4) 'Returns: 2 MySqr = Sqr(23) 'Returns: 4.79583152331272 MySqr = Sqr(0) 'Returns: 0 MySqr = Sqr(-4) 'Returns an error when executing the code end sub