This type of function is used when you have certain incremental values that you want to move real-world values into. It's often referred to as a snap-to or quantize function. In both implementations below, intNum is the number you're testing and intRn is the number that you want to move intNum to the nearest multiple of.
<% Function RoundTo(intNum, intRn) RoundTo= Int((intNum / intRn)+.5) * intRn End Function %>
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.