Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rounding Up
Im needing a code to round up not down
100.1 = needs to be 101 100.2 = needs to be 101 100.9 = needs to be 101 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rounding Up
Check out the CEILING() function.
-- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "Mike" wrote in message ... Im needing a code to round up not down 100.1 = needs to be 101 100.2 = needs to be 101 100.9 = needs to be 101 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rounding Up
In need it to be in vba this is what I have. If the sum of
rs.Fields("SumOfRTL_QTY").Value / 10 is a decimal just round up to the next Integer ThisWorkbook.Worksheets(1).Range(AD & i) = _rs.Fields("SumOfRTL_QTY").Value / 10 "Sandy Mann" wrote: Check out the CEILING() function. -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "Mike" wrote in message ... Im needing a code to round up not down 100.1 = needs to be 101 100.2 = needs to be 101 100.9 = needs to be 101 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rounding Up
Int(rs.Fields("SumOfRTL_QTY").Value / 10 +1))
-- Best regards, Edward "Mike" wrote: In need it to be in vba this is what I have. If the sum of rs.Fields("SumOfRTL_QTY").Value / 10 is a decimal just round up to the next Integer ThisWorkbook.Worksheets(1).Range(AD & i) = _rs.Fields("SumOfRTL_QTY").Value / 10 "Sandy Mann" wrote: Check out the CEILING() function. -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "Mike" wrote in message ... Im needing a code to round up not down 100.1 = needs to be 101 100.2 = needs to be 101 100.9 = needs to be 101 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rounding Up
Public Function Ceil(dblSource As Double) As Long Dim dblFloor As Double dblFloor = Int(dblSource) If dblFloor = dblSource Then Ceil = dblFloor Else Ceil = dblFloor + 1 End If End Function |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rounding Up
ThisWorkbook.Worksheets(1).Range(AD & i) =
Application.Ceiling(_rs.Fields("SumOfRTL_QTY").Val ue / 10,1) -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Mike" wrote in message ... In need it to be in vba this is what I have. If the sum of rs.Fields("SumOfRTL_QTY").Value / 10 is a decimal just round up to the next Integer ThisWorkbook.Worksheets(1).Range(AD & i) = _rs.Fields("SumOfRTL_QTY").Value / 10 "Sandy Mann" wrote: Check out the CEILING() function. -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "Mike" wrote in message ... Im needing a code to round up not down 100.1 = needs to be 101 100.2 = needs to be 101 100.9 = needs to be 101 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ROUNDING FORMULA =ROUND(B12/$B$10,1) ROUNDING TO HIGH | Excel Worksheet Functions | |||
Rounding up | Excel Worksheet Functions | |||
I need a formula with rounding up & rounding down to the nearest . | Excel Worksheet Functions | |||
Rounding off to .48 or .98 | Excel Discussion (Misc queries) | |||
Worksheet rounding vs VBA rounding | Excel Programming |