Roundup or Ceiling Function to round to a specific number
Angie33 wrote:
Hi Bob,
I think I will be using your ugly version. It works very well.
Ugly or not, I think it fits the needed solution well. It took me a
long time to understand the poorly-stated and every-changing problem
specification. When I finally did, I independently came up with
exactly the same solution. Kudos to Bob for seeing through the
confusion early on.
It appears that your rounding rules a round up to a multiple of 5,
but when that results in a multiple of 10, round down from there (i.e.
subtract one) so that the number ends in 9 instead of 0. That is
exactly how Bob's expression reads. So frankly, I see nothing ugly
about solution. "The punishment fits the crime" ;-).
|