round up decimal to next whole number

  • Thread starter Thread starter S
  • Start date Start date
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
 
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))
 
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
 
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
 
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
 
Back
Top