Sorting the cells by ascending order