[Solved] Rounding result to nearest .25

[Solved] Rounding result to nearest .25

Greetings

I'm looking for a way to round results to the nearest .25, up or down. Is there a way?

For example the results of simple mathematical functions on the left instead display as on the right.

1297.93 =======> 1298
1290.67 =======> 1290.75
1278.08 =======> 1278
1270.92 =======> 1271
1258.33 =======> 1258.25
1251.17 =======> 1251.25
1238.58 =======> 1238.50

v 2.3.0 / Windows 2000 SP4
Thanks
Last edited by Hagar Delest on Tue Jun 10, 2008 2:21 pm, edited 2 times in total.
Reason: tagged the thread as Solved.
OpenOffice 3.1.0 Build 9399 on Windows 2000
trevor-es

Posts: 17
Joined: Wed Jan 23, 2008 12:31 am

Re: Rounding result to nearest .25

To round A1 use
=ROUND(4*A1;0)/4
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
TerryE
Volunteer

Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK

Re: Rounding result to nearest .25

=MROUND(A1;0.25)
Apache OpenOffice 4.1.6 on PCLinuxOS

kingfisher
Volunteer

Posts: 2120
Joined: Tue Nov 20, 2007 10:53 am

Re: Rounding result to nearest .25

Thanks - Seems to be working
OpenOffice 3.1.0 Build 9399 on Windows 2000
trevor-es

Posts: 17
Joined: Wed Jan 23, 2008 12:31 am

Re: [Solved] Rounding result to nearest .25

Nice one kngfisher, I guess that I tend to be minimalist in my use of functions. MROUND(x;y) == ROUND(x/y;0)*y. Neat and shorter
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
TerryE
Volunteer

Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK