I am attempting to build a rounding formula to match FDA nutritional labeling guidelines. Using "calories" as an example, below are the rules I have to follow to build out the formula so that someone can type in the calculated value for calories in one column and get guidance on what value needs to be placed on the printed nutritional panel.
- <5 cal - express as 0
- </=50 - express to nearest 5 cal increment
- *>50 - express to nearest 10 cal increment
Let's say the input were 46, the output of the formula would need to be 45. If the input were 48, the output would need to be 50.
MROUND only rounds up to the nearest expressed increment. Is there any way around this so that I can account for instances where I need to round down to the nearest 5 or 10?