Thread
:
Rounding Up
View Single Post
#
1
Posted to microsoft.public.excel.programming
Sandy Mann
external usenet poster
Posts: 2,345
Rounding Up
Try something like:
If int(rs.Fields("SumOfRTL_QTY").Value / 10 ) < _
rs.Fields("SumOfRTL_QTY").Value / 10 then _
ThisWorkbook.Worksheets(1).Range(AD & i) = _
Int(rs.Fields("SumOfRTL_QTY").Value/10)+1
Else
ThisWorkbook.Worksheets(1).Range(AD & i) = _
rs.Fields("SumOfRTL_QTY").Value / 10
--
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
...
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 With Quote
Sandy Mann
View Public Profile
Find all posts by Sandy Mann