Public Function Round(ByVal Number As Double, Optional ByVal Decimals As Long = 0, Optional ByVal MidpointingMode As Long = 0) As Double
Rounds the specified number to the specified number of decimals. Because of using doubles (that cannot represent every exact number), some artefacts may occurr.
SendDebug Round(Pi, 5) 'Prints 3.14159
SendDebug Round(3.5, 0, 0) 'Prints 4
SendDebug Round(2.5, 0, 0) 'Prints 2
SendDebug Round(2.5, 0, 1) 'Prints 3