Max returns the value of "1" but there are over 1000 entries: (Code, 1 line) The numbers start in cell A1 and go over cell A1000. Every combination of Sheets(1), Sheets("Sheet1") has been tried still max=1.