A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Rounding number



 
 
Thread Tools Display Modes
  #1  
Old September 23rd, 2009, 02:57 PM posted to microsoft.public.access.queries
Boon
external usenet poster
 
Posts: 115
Default 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  
Old September 23rd, 2009, 03:34 PM posted to microsoft.public.access.queries
Golfinray
external usenet poster
 
Posts: 1,597
Default 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  
Old September 23rd, 2009, 03:35 PM posted to microsoft.public.access.queries
Golfinray
external usenet poster
 
Posts: 1,597
Default 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  
Old September 23rd, 2009, 04:16 PM posted to microsoft.public.access.queries
Boon
external usenet poster
 
Posts: 115
Default 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  
Old September 23rd, 2009, 05:01 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 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  
Old September 23rd, 2009, 05:02 PM posted to microsoft.public.access.queries
vanderghast
external usenet poster
 
Posts: 593
Default 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  
Old September 23rd, 2009, 05:28 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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  
Old September 23rd, 2009, 06:25 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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  
Old September 23rd, 2009, 07:18 PM posted to microsoft.public.access.queries
Boon
external usenet poster
 
Posts: 115
Default 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  
Old September 23rd, 2009, 07:34 PM posted to microsoft.public.access.queries
Boon
external usenet poster
 
Posts: 115
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:19 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.