PDA

View Full Version : [SOLVED] Rounding to a Fraction



Opv
08-30-2015, 08:16 PM
Is there a way to round to the nearest .25? For example, if one has 1.45 teaspoons of soup, is there a way to round that to 1.5. 1.15 would be rounded to 1.25 while 1.10 would be rounded to to 1.00.

Trebor76
08-30-2015, 09:29 PM
Hi Opv,

This will give the desired result based on the value in cell A1 (change to suit):

=IF(AND(A1-INT(A1)>=0.01,A1-INT(A1)<=0.14),INT(A1),CEILING(A1,1/4))

Regards,

Robert

snb
08-30-2015, 11:00 PM
=FLOOR(CEILING(A1,.125),.25)

Opv
08-31-2015, 06:33 AM
Trebor76, your suggested solution rounds 1.13 down to 1 rather than up to 1.25.

snb, as always your suggested solution is both succinct and works like a charm.

Thanks to both of you for your kind response.