Newbies daviper Posted April 7, 2008 Newbies Posted April 7, 2008 (edited) To all the gurus, how do I round up a field that contains a number? Basically like this, Field A = Calculation which result as a number Field B = Round up of Field A's result. So, let's say Field A is 345.670 and I want Field B to be 345.700 TIA Edited April 7, 2008 by Guest
Lee Smith Posted April 7, 2008 Posted April 7, 2008 There is a Round Function. i.e. Round ( number ; precision ) where you can control the round with the number of places (precision). But to understand what you are really wanting, you need to provide an example if the Round Function isn't what you are looking for. 10.3755555 10.5555 10.80 Lee
mr_vodka Posted April 7, 2008 Posted April 7, 2008 Is this for display only? If so, then you dont really need a second field. You can take Field A, and then under number format, then in an option for number of digits. ( Control-click for Mac) If you definately need a second calc field then look into Round(FieldA;N) Where N is the number of digits you want to round to.
Newbies daviper Posted April 7, 2008 Author Newbies Posted April 7, 2008 Yes, I am aware of that but the Round function doesn't let me to put a field. eg. Round (Field B,-2) gave me a blank field on view mode.
Lee Smith Posted April 7, 2008 Posted April 7, 2008 why are you using a minus sign. If you want to round to whole numbers, just make it Round (Field B; 0 )
Newbies daviper Posted April 7, 2008 Author Newbies Posted April 7, 2008 Tried Round(Field B;0) still got a blank. :
mr_vodka Posted April 7, 2008 Posted April 7, 2008 Uhmmm wouldnt it be Round([color:red]Field A;0) ? Also with the example you just added... So, let's say Field A is 345.670 and I want Field B to be 345.700 you want it rounded to the tenth, so it would be: Round([color:red]Field A; 1)
Newbies daviper Posted April 7, 2008 Author Newbies Posted April 7, 2008 Got it! Thanks guys! Found the solution. :
Lee Smith Posted April 7, 2008 Posted April 7, 2008 :hair: Good catch. [color:red]daviper, You don't need a second field, you can use the Auto Enter Option on Field A, and it will change it to what you want. If you need more information about this, let me know. Lee
dwins Posted April 7, 2008 Posted April 7, 2008 This formula rounds positive numbers up. Let ( [ a = 234.000003 ; //number b = 2 ; //decimal places c = 1/10^b ] ; Ceiling ( a / c ) * c ) //gives 234.01
Stickybeak Posted November 5, 2010 Posted November 5, 2010 I need to round a decimal to the next nearest multiple of .25 - any suggestions?
Recommended Posts
This topic is 5190 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now