
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
rounding downward in round()
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()?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
You can try
=round(0.005,-0.01)
That gives 0.00
=round(0.005,0.01)
That gives 0.01
Regards
Anders

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
You can try
=round(0.005,-0.01)
That gives 0.00
=round(0.005,0.01)
That gives 0.01
Regards
Anders

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks everyone. Specially Ansch. Your solution working perfect ^^

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
