Round integer division .5 to 1

Dona

Registered User.
Local time
Today, 19:14
Joined
Jun 27, 2002
Messages
55
Please help me with the round function. I want .5 to round to 1.
Here is an example of my data: (18+18+18+20)/4 = 18.5 rounds to 18. I want it to round to 19.

I used the following expression:
RoundACT Composite Score: Round((([Column1]+[Column2]+[Column3]+[Column4])/4),0)

Thank you.
 
Please help me with the round function. I want .5 to round to 1.
Here is an example of my data: (18+18+18+20)/4 = 18.5 rounds to 18. I want it to round to 19.

I used the following expression:
RoundACT Composite Score: Round((([Column1]+[Column2]+[Column3]+[Column4])/4),0)

Thank you.

Try the following trick
round(yournumber + 0.5)

Using the above, 18.5 will be rounded to 19.
 
If I use your suggestion, what happens if the result is 18.3? This should be rounded to 18 .....not 18.3 + .5=18.8 rounded to 19.
 
Sorry I was confused with the Fix function.
Fix() function trims the decimal point of a number so it's more versatile than round
as you can customize it your way to round up or down.
So, for your case use
Fix(yournumber+0.5)
If the numbers you want to round are only positives then you can also use the Int() funciton.

There's another trick using the Round function suggesting that you add
a tiny number to your number in order to force up rounding as following
round(yournumber+0.001) but in my opinion avoid using that
 
Would I write the expression as follows:

RoundACT Composite Score: Fix((([Column1]+[Column2]+[Column3]+[Column4])/4),+0.5)
?
 
Would I write the expression as follows:

RoundACT Composite Score: Fix((([Column1]+[Column2]+[Column3]+[Column4])/4),+0.5)
?

I am not quite sure what the RoundACT Composite Score stands for in your expression, but the formula you need to give the rounded average is
Fix((( [Column1]+[Column2]+[Column3]+[Column4] ) / 4) + 0.5)
 
Thank you. This worked!!!! I appreciate you taking the time to help me.
 

Users who are viewing this thread

Back
Top Bottom