If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Rounding number
Hello,
I would like to know what function in Access that would perform exactly the same as function Round() in Excel. In excel I use function, for instance, =Round(A1,2). For rounding to 2 decimal place. Thanks, Boon |
#2
|
|||
|
|||
Rounding number
Round([yourfield])
-- Milton Purdy ACCESS State of Arkansas "Boon" wrote: Hello, I would like to know what function in Access that would perform exactly the same as function Round() in Excel. In excel I use function, for instance, =Round(A1,2). For rounding to 2 decimal place. Thanks, Boon |
#3
|
|||
|
|||
Rounding number
Sorry, I think you can also do Round([yourfield],2) if you want a specified
round. -- Milton Purdy ACCESS State of Arkansas "Boon" wrote: Hello, I would like to know what function in Access that would perform exactly the same as function Round() in Excel. In excel I use function, for instance, =Round(A1,2). For rounding to 2 decimal place. Thanks, Boon |
#4
|
|||
|
|||
Rounding number
No, that doesn't work. I have been told to use int() but I don't know how to
use it. Thanks. "golfinray" wrote in message ... Sorry, I think you can also do Round([yourfield],2) if you want a specified round. -- Milton Purdy ACCESS State of Arkansas "Boon" wrote: Hello, I would like to know what function in Access that would perform exactly the same as function Round() in Excel. In excel I use function, for instance, =Round(A1,2). For rounding to 2 decimal place. Thanks, Boon |
#5
|
|||
|
|||
Rounding number
What is wrong with the resulsts from the expression Round([yourfield],2) ?
Post the orignal number, results, and expected results. -- Build a little, test a little. "Boon" wrote: No, that doesn't work. I have been told to use int() but I don't know how to use it. Thanks. "golfinray" wrote in message ... Sorry, I think you can also do Round([yourfield],2) if you want a specified round. -- Milton Purdy ACCESS State of Arkansas "Boon" wrote: Hello, I would like to know what function in Access that would perform exactly the same as function Round() in Excel. In excel I use function, for instance, =Round(A1,2). For rounding to 2 decimal place. Thanks, Boon |
#6
|
|||
|
|||
Rounding number
Rounding down to two decimal place (100) :
int(CDec(100) * x ) / 100 Rounding to the nearest 'integer' to two decimal places: int(0.5 + CDec(100)*x) / 100 Rounding up to two decimal places: -int(-CDec(100)*x)/100 All those assume x = 0. Using CDec(100) bring the minimum internal representation error while processing the multiplication. Vanderghast, Access MVP "Boon" wrote in message ... No, that doesn't work. I have been told to use int() but I don't know how to use it. Thanks. "golfinray" wrote in message ... Sorry, I think you can also do Round([yourfield],2) if you want a specified round. -- Milton Purdy ACCESS State of Arkansas "Boon" wrote: Hello, I would like to know what function in Access that would perform exactly the same as function Round() in Excel. In excel I use function, for instance, =Round(A1,2). For rounding to 2 decimal place. Thanks, Boon |
#7
|
|||
|
|||
Rounding number
On Wed, 23 Sep 2009 10:16:26 -0500, "Boon"
wrote: No, that doesn't work. I have been told to use int() but I don't know how to use it. Round() does indeed work when used correctly. What's the datatype of the field? What exact expression are you using? In what context (in a Query, on a Form, or what?) -- John W. Vinson [MVP] |
#8
|
|||
|
|||
Rounding number
On Wed, 23 Sep 2009 08:57:39 -0500, "Boon"
wrote: Hello, I would like to know what function in Access that would perform exactly the same as function Round() in Excel. In excel I use function, for instance, =Round(A1,2). For rounding to 2 decimal place. Thanks, Boon Are you perhaps (without saying so, leaving it to intuition to divine) concerned about the difference between "Banker's Rounding" - a 5 in the last place rounds to the nearest even digit - and "Arithmatic Rounding" - a 5 always rounds up? -- John W. Vinson [MVP] |
#9
|
|||
|
|||
Rounding number
I saw that round() did not do the arithmetic rounding. It does banker's
rounding which is not what I want. "John W. Vinson" wrote in message ... On Wed, 23 Sep 2009 10:16:26 -0500, "Boon" wrote: No, that doesn't work. I have been told to use int() but I don't know how to use it. Round() does indeed work when used correctly. What's the datatype of the field? What exact expression are you using? In what context (in a Query, on a Form, or what?) -- John W. Vinson [MVP] |
#10
|
|||
|
|||
Rounding number
I am concerened. I need to have the exact same result as round() function in
excel. "John W. Vinson" wrote in message ... On Wed, 23 Sep 2009 08:57:39 -0500, "Boon" wrote: Hello, I would like to know what function in Access that would perform exactly the same as function Round() in Excel. In excel I use function, for instance, =Round(A1,2). For rounding to 2 decimal place. Thanks, Boon Are you perhaps (without saying so, leaving it to intuition to divine) concerned about the difference between "Banker's Rounding" - a 5 in the last place rounds to the nearest even digit - and "Arithmatic Rounding" - a 5 always rounds up? -- John W. Vinson [MVP] |
|
Thread Tools | |
Display Modes | |
|
|