#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,345
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ROUNDING FORMULA =ROUND(B12/$B$10,1) ROUNDING TO HIGH SunshineinFt.Myers[_2_] Excel Worksheet Functions 7 March 5th 09 06:41 PM
Rounding up Kavi Excel Worksheet Functions 1 October 24th 08 09:16 AM
I need a formula with rounding up & rounding down to the nearest . Tony Kay Excel Worksheet Functions 3 May 29th 07 11:13 PM
Rounding off to .48 or .98 Mark4253 Excel Discussion (Misc queries) 9 February 5th 07 02:13 AM
Worksheet rounding vs VBA rounding Simon Cleal Excel Programming 4 September 2nd 05 01:50 AM


All times are GMT +1. The time now is 09:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"