Calculating a value inside one range to a value of another range