How to find the range of data