Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default is there worksheet Int function to round decimals up instead of do

Hello,

In MSAccess there is a CInt function that rounds decimal numbers up and an
Int function that rounds down. I need to round decimals up in an Excel
worksheet. The Int function rounds down. Is there a worksheet function that
rounds decimal to the next integer value? How to round up?

Thanks,
Rich
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default is there worksheet Int function to round decimals up instead of do


If cell A! contains the value .0675 then the formula =ROUNDUP(A1,0)
will result in a value of 1.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default is there worksheet Int function to round decimals up instead of do

from VBA help on Cint

When the fractional part is exactly 0.5, CInt and CLng always round it to
the nearest even number. For example, 0.5 rounds to 0, and 1.5 rounds to 2.
CInt and CLng differ from the Fix and Int functions, which truncate, rather
than round, the fractional part of a number. Also, Fix and Int always return
a value of the same type as is passed in.



In Excel, there are
round
roundown
roundup
ceiling
floor
Trunc

and a couple of related including mround from the analysis toolpak.

--
Regards,
Tom Ogilvy


--
regards,
Tom Ogilvy



"Rich" wrote:

Hello,

In MSAccess there is a CInt function that rounds decimal numbers up and an
Int function that rounds down. I need to round decimals up in an Excel
worksheet. The Int function rounds down. Is there a worksheet function that
rounds decimal to the next integer value? How to round up?

Thanks,
Rich

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default is there worksheet Int function to round decimals up instead of do

Thank you all for your replies. I did look at the help files for all of the
functions mentioned here. My problem is that I am calculating a value from
various other cells, so the roundup/down function won't work because I don't
have the correct arguments. However, I just thought of one option using VBA
- I could write a funciton which returns the correct value and invoke that
function in the worksheet in a formula. I will give that a try.


"Rich" wrote:

Hello,

In MSAccess there is a CInt function that rounds decimal numbers up and an
Int function that rounds down. I need to round decimals up in an Excel
worksheet. The Int function rounds down. Is there a worksheet function that
rounds decimal to the next integer value? How to round up?

Thanks,
Rich

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
VB Function Round vs Excel function Round not behaving the same Od Bud Excel Programming 5 August 18th 06 05:39 AM
I WANT EVEN NUMBERS; NO DECIMALS - ROUND HERNAN Excel Discussion (Misc queries) 3 July 14th 06 06:25 PM
a function on decimals chartasap Excel Worksheet Functions 8 July 5th 05 06:51 PM
Bug - Decimals in Excel Worksheet Ian Excel Discussion (Misc queries) 2 February 15th 05 03:50 PM
How do I ROUND() round off decimals of a column dataset? Højrup Excel Worksheet Functions 2 January 12th 05 10:50 AM


All times are GMT +1. The time now is 09:37 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"