How to select the highest or lowest value in excel using function