posted 11 years ago
I am doing a data manipulation as below:
Requirement 1:
• Aspect ratios can range from 20 to 85 in increments of 5.
• Round to the nearest 5. Examples: >72.5 and < 77.5, round to 75. >77.5 and < 82.5, round to 80. Valid values include: 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85.
Requirement 2:
o Tire widths can range from 145 mm to 395 mm, in increments of 10 mm; e.g., 145, 155, 165, 175, … 395.
o Round to the nearest value ending in a 5. Examples: if >150 and <160, round to 155. If >220 and <230, round to 225.
For the Requirement 1 I am using the following function and it is working fine. But for the Requirement 2 this function is not working. I would appreciate if someone can help to write a function for the Requirement 2.
Here is the Function for Requirement 1 which is working perfectly. I want to implement a similar function for the requirement 2 for the incremental of 10 instead of 5.