Print Page | Close Window

Formula to Round to Nearest Multiple of 5

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=11708
Printed Date: 07 May 2024 at 1:33pm


Topic: Formula to Round to Nearest Multiple of 5
Posted By: waterg2
Subject: Formula to Round to Nearest Multiple of 5
Date Posted: 18 Nov 2010 at 5:52am
I'm trying to build a formula that rounds the value to the nearest multiple of 5.
 
Example 1: value is 316, would be rounded to 315.
Example 2" value is 318, would be rounded to 320.
 
Is this possible? Any help would be greatly appreciated.
 
 


-------------
waterg2



Replies:
Posted By: DBlank
Date Posted: 18 Nov 2010 at 6:06am
try:
mround(field,5)


Posted By: waterg2
Date Posted: 18 Nov 2010 at 6:40am
Thank you very much !!!! That seems to be working.

-------------
waterg2


Posted By: waterg2
Date Posted: 18 Nov 2010 at 8:11am
Question - We use version 8.5 and 11.5, as the newer version is not support by one of our vendors.
 
I noticed the MRound(field,5) function is not available in 8.5...but is in 11.5. Is there another work around we could use in 8.5 to arrive at the same result?


-------------
waterg2


Posted By: DBlank
Date Posted: 18 Nov 2010 at 8:15am

haev not used that version so I am not sure what else would work in it.

Anyone else that knows 8.5?



Print Page | Close Window