Archive of Mr Excel Message Board


Back to Forms in Excel VBA archive index
Back to archive home

Rounding to nearest multiple of 5

Posted by Don C on February 12, 2002 9:25 AM
Given a column of numbers, we want to round to the nearest multiple of 5.

I found on this board the FLOOR function, but that takes a number to the next lowest multiple of 5. I want the nearest multiple of 5, so sometimes it rounds up and sometimes it rounds down.

Thanks


Check out our Excel Resources

Re: Rounding to nearest multiple of 5

Posted by IML on February 12, 2002 9:31 AM

If you have the analyst tool pak installed, use
=MROUND(A1,5)

otherwise you could use
=ROUND(A1/5,0)*5


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.