Get the range from the selection