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
  #11  
Old September 23rd, 2009, 10:05 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Rounding number

My Access 2007 rounds like Excel --
xx Expr1
1.5 1.5
1.001 1
5.0008 5
1.555 1.56
1.556 1.56
1.545 1.54
1.546 1.55

Post your numbers.

--
Build a little, test a little.


"Boon" wrote:

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]




  #12  
Old September 24th, 2009, 12:05 AM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Rounding number

Did you try rounding 1.565? If things remain the same with the round
function, you should get 1.56 and not the expected 1.57

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

KARL DEWEY wrote:
My Access 2007 rounds like Excel --
xx Expr1
1.5 1.5
1.001 1
5.0008 5
1.555 1.56
1.556 1.56
1.545 1.54
1.546 1.55

Post your numbers.

  #13  
Old September 24th, 2009, 12:36 AM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Rounding number

Expr1: Round([xx],2)

xx Expr1
1.001 1
5.0008 5
1.555 1.56
1.556 1.56
1.545 1.54
1.546 1.55
1.565 1.56

I just noticed that if the 2nd place is 5 then the 3rd place causing a round
up where 3rd is 5.
If the 2nd place is 4 then the 3rd place causing a round down where 3rd is 5.

--
Build a little, test a little.


"John Spencer" wrote:

Did you try rounding 1.565? If things remain the same with the round
function, you should get 1.56 and not the expected 1.57

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

KARL DEWEY wrote:
My Access 2007 rounds like Excel --
xx Expr1
1.5 1.5
1.001 1
5.0008 5
1.555 1.56
1.556 1.56
1.545 1.54
1.546 1.55

Post your numbers.


  #14  
Old September 24th, 2009, 12:36 AM posted to microsoft.public.access.queries
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Rounding number

Tip-toeing in... http://www.mvps.org/access/modules/mdl0054.htm

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Boon" wrote in message
...
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]





  #15  
Old September 24th, 2009, 02:03 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Rounding number

Well, that article specifically says it is using Banker's rounding.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Gina Whipp wrote:
Tip-toeing in... http://www.mvps.org/access/modules/mdl0054.htm

  #16  
Old September 24th, 2009, 02:20 PM posted to microsoft.public.access.queries
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Rounding number

OOPS, wrong page... http://allenbrowne.com/round.html

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"John Spencer" wrote in message
...
Well, that article specifically says it is using Banker's rounding.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Gina Whipp wrote:
Tip-toeing in... http://www.mvps.org/access/modules/mdl0054.htm



 




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 04:46 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.