Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For that particular number, Int(2.9) + 1 and 2.9 \ 1 give the same result. But that's not true
if the number is 2.1. If the OP wants to always round up, the division won't work for fractional parts < 0.5, and the first formula is flawed for whole numbers. Int(2) + 1 = 3. If I interpret the question correctly, the result should be 2. Maybe this will do it Function RoundUp(x As Double) Dim y As Double y = Int(x) If y = x Then RoundUp = y Else RoundUp = y + 1 End If End Function On Fri, 8 Aug 2003 19:03:31 +0100, "Bob Phillips" wrote: or even 2.9 \ 1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i use the roundup function | Excel Worksheet Functions | |||
roundup function | Excel Discussion (Misc queries) | |||
ROUNDUP Function | Excel Discussion (Misc queries) | |||
Roundup Function | Excel Worksheet Functions | |||
Roundup Function | Excel Discussion (Misc queries) |