VBA Functions: Numbers and Math

Find the list of all the main VBA functions on the VBA Functions page.

Numbers and Math

AbsReturns the absolute value of a number.
CInt / CLngConverts a numeric value to an integer by rounding to the nearest integer.
CSng / CDblConverts a numeric value to a floating-point number.
Int / FixReturns the integer part of a number.
RGBReturns an integer corresponding to a color in RGB format.
RndReturns a random number less than 1 and greater than or equal to 0.
RoundRounds a number according to the specified number of decimals.
ValReturns the numbers contained in a string.