Hi all,
I am trying to work out a formula that will round a number to the nearest 5 or 9.
For example:
656 goes to 655
681 goes to 679
684 goes to 685
723 goes to 725
780 goes to 779
809 stays at 809
837 goes to 839
970 goes to 969
etc.
I have this formula currently: <style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Lucida Grande'; color: #000000}span.s1 {color: #006107}span.s2 {color: #0057d6}span.s3 {color: #ab30d6}</style>=MAX(INT(D2/10)*10 + IF(MOD(D2,10)>=5,9,-1),0)
It rounds to the nearest 9, but I need to get nearest 5 in there as well.
Any ideas or is this too many conditions to squeeze into one formula?
I am trying to work out a formula that will round a number to the nearest 5 or 9.
For example:
656 goes to 655
681 goes to 679
684 goes to 685
723 goes to 725
780 goes to 779
809 stays at 809
837 goes to 839
970 goes to 969
etc.
I have this formula currently: <style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Lucida Grande'; color: #000000}span.s1 {color: #006107}span.s2 {color: #0057d6}span.s3 {color: #ab30d6}</style>=MAX(INT(D2/10)*10 + IF(MOD(D2,10)>=5,9,-1),0)
It rounds to the nearest 9, but I need to get nearest 5 in there as well.
Any ideas or is this too many conditions to squeeze into one formula?