round up decimal to next whole number

S

S

I have created a query that adds two fields together and divides it by two.
I used the round function, but it doesn't round up, it just drops the decimal.

Average: Round(([Total Performance]+[Total Technique])/2)

How do I get it to round up?

IE if 1 field has the number 279 and the other field had the number 274
It should add them up divide by two = 276.5

I want it to return 277, but instead i get 276.

please help
 
K

KARL DEWEY

Last post not correct --
Average: IIf((([Total Performance]+[Total Technique])/2)-Int((([Total
Performance]+[Total Technique])/2))>0,Int((([Total Performance]+[Total
Technique])/2))+1,(([Total Performance]+[Total Technique])/2))
 
S

S

That did not work?

Any other suggestions?

KARL DEWEY said:
Try this --
Average: Round(([Total Performance]+[Total Technique])/2,0)

--
KARL DEWEY
Build a little - Test a little


S said:
I have created a query that adds two fields together and divides it by two.
I used the round function, but it doesn't round up, it just drops the decimal.

Average: Round(([Total Performance]+[Total Technique])/2)

How do I get it to round up?

IE if 1 field has the number 279 and the other field had the number 274
It should add them up divide by two = 276.5

I want it to return 277, but instead i get 276.

please help
 
S

S

That worked. Thank You!

KARL DEWEY said:
Last post not correct --
Average: IIf((([Total Performance]+[Total Technique])/2)-Int((([Total
Performance]+[Total Technique])/2))>0,Int((([Total Performance]+[Total
Technique])/2))+1,(([Total Performance]+[Total Technique])/2))

--
KARL DEWEY
Build a little - Test a little


S said:
I have created a query that adds two fields together and divides it by two.
I used the round function, but it doesn't round up, it just drops the decimal.

Average: Round(([Total Performance]+[Total Technique])/2)

How do I get it to round up?

IE if 1 field has the number 279 and the other field had the number 274
It should add them up divide by two = 276.5

I want it to return 277, but instead i get 276.

please help
 
J

John Spencer

Simpler formula if the number is always positive.

-Int(-(([Total Performance]+[Total Technique])/2))



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

That worked. Thank You!

KARL DEWEY said:
Last post not correct --
Average: IIf((([Total Performance]+[Total Technique])/2)-Int((([Total
Performance]+[Total Technique])/2))>0,Int((([Total Performance]+[Total
Technique])/2))+1,(([Total Performance]+[Total Technique])/2))

--
KARL DEWEY
Build a little - Test a little


S said:
I have created a query that adds two fields together and divides it by two.
I used the round function, but it doesn't round up, it just drops the decimal.

Average: Round(([Total Performance]+[Total Technique])/2)

How do I get it to round up?

IE if 1 field has the number 279 and the other field had the number 274
It should add them up divide by two = 276.5

I want it to return 277, but instead i get 276.

please help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top