Int() |
Top Previous Next |
Int() - Determine the integer portion of a number Description The Int() function returns the integer portion of a number. Int(Number) Int and Fix are interchangeable except when the number is negative, Int returns the first negative integer less than or equal to number, whereas Fix returns the first negative integer greater than or equal to number. Example MyInteger = Int(45.72) 'returns 45 MyInteger = Int(-45.72) 'returns -46
'whereas Fix() MyInteger = Fix(-45.72) 'returns -45 |