Rounding
Rounding Up
Using Excel
Application.WorksheetFunction.RoundUp(value,0) - no decimal places
Rounding Down
Using Excel
Application.WorksheetFunction.RoundDown(value,-1) - no decimal places
The CINT Function
The CINT function returns the expression converted to an integer data type.
This function rounds up to the nearest integer if the fractional part is greater than 0.5.
This function rounds down if it is less than or equal to 0.5.
CInt(0.2) = 0
CInt(0.5) = 0
CInt(0.6) = 1
CInt(0.9) = 1
CInt(1.1) = 1
CInt(1.5) = 1
CInt(-1.1) = -2
CInt(-1.9) = -2
The INT Function
The INT function returns the integer portion of a number.
This function always rounds down to the nearest integer.
Int(0.2) = 0
Int(0.5) = 0
Int(0.6) = 0
Int(0.9) = 0
Int(1.1) = 1
Int(1.5) = 1
Int(-1.1) = -2
Int(-1.9) = -2
The FIX Function
The FIX function returns the integer portion of a number.
This function truncates without rounding.
Fix(0.2) '= 0
Fix(0.5) '= 0
Fix(0.6) '= 0
Fix(0.9) '= 0
Fix(1.1) '= 1
Fix(1.5) '= 1
Fix(-1.1) '= -1
Fix(-1.9) '= -1
The ROUND Function
The ROUND function rounds numbers to a given number of decimal places.
Round(0.2, 0) '= 0
Round(0.5, 0) '= 0
Round(0.6, 0) '= 1
Round(0.9, 0) '= 1
Round(1.1, 0) '= 1
Round(1.5, 0) '= 2
Round(-1.1, 0) '= -1
Round(-1.9, 0) '= -2
Fractional Parts
When you convert a nonintegral value to an integral type, the integer conversion functions (CByte, CInt, CLng, CSByte, CShort, CUInt, CULng, and CUShort) remove the fractional part and round the value to the closest integer.
If the fractional part is exactly 0.5, the integer conversion functions round it to the nearest even integer. For example, 0.5 rounds to 0, and 1.5 and 2.5 both round to 2.
This is sometimes called Bankers Rounding, and its purpose is to compensate for a bias that could accumulate when adding many such numbers together.
CInt and CLng differ from the Int and Fix functions, which truncate, rather than round, the fractional part of a number.
Also, Fix and Int always return a value of the same data type as you pass in.
Significant Figures
Double - 14 significant figures
Single - 6 significant figures
Rounding Errors
Because of these limitations to floating-point mathematics, you might encounter rounding errors when you perform operations on floating-point numbers.
Compared to the size of the value you are working with, the rounding error will be very small.
If you do not require absolute accuracy and can afford relatively small rounding errors, the floating-point data types are ideal for representing very small or very large values.
On the other hand, if your values must be accurate - for example, if you are working with money values - you should consider one of the scaled integer data types.
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext