Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I return the integer portion of a number? for example 508.5 or
508.49 or 508.51 all should return 508 I have tried this:: Sub test() Dim anyNum As Double Dim I As Integer anyNum = 508.51 I = anyNum \ 1 MsgBox I End Sub However, VB is first rounding anyNum in I = anyNum \ 1 and then doing the \ 1 operation. Thus 508.51 returns 509 instead of the desired value of 508. Thanks in advance! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Buttons in lower portion of workbook appear in upper portion | Excel Programming | |||
funtion to determine the fraction portion of a number? | Excel Worksheet Functions | |||
Returning an integer from a Function | Excel Programming | |||
how do i operate on the decimal portion of a number | New Users to Excel | |||
Display ONLY fraction portion of number | Excel Discussion (Misc queries) |