How to display value based on a range?