I've got a worksheet with specification for some of my products. And when the products are tested the results should be rounded to the nearest number with the same amount of decimal places as given in the specifications.
Example:
Specifications: 2.03 - 2.48 --> Result is 2.2456 this should be rounded to 2.25
Specifications: 13500 - 16500 --> Result is 15680.1234 this result should be rounded to 15680
The VBA code should look for the amount of decimal places in the specifications and use that value to round the result value. Is there a way to do this?
Any suggestions?