Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all im new in QV.
im using round() to round up or down numbers. but now i need to round down number ending with .005
In QV help it says "If x is exactly in the middle of an interval, it is rounded upwards" Is it possible to do it in round(). Or should i use floor()?
Hi
You can try
=round(0.005,-0.01)
That gives 0.00
=round(0.005,0.01)
That gives 0.01
Regards
Anders
Hi
You can try
=round(0.005,-0.01)
That gives 0.00
=round(0.005,0.01)
That gives 0.01
Regards
Anders
Rounding Upwards
ceil( x [, base [, offset ]])
Rounding of x upwards to the nearest multiple of base with an offset
of offset.
ceil( 2.4 ) returns 3
Rounding Downwards
floor( x [ , base [ , offset ]] )
Rounding of x downwards to the nearest multiple of base with an
offset of offset.
floor( 2.4 ) returns 2
I hope this helps.. Please mark the post answered if this helps!
thanks everyone. Specially Ansch. Your solution working perfect ^^
Hi,
what if we want round value less if value is x.5 and greater than x.5 then upper value
e.g:
Value is 2.5 should return 2
Value is 2.6 should return 3