Place "Option Explicit" at the top of your code module and Dim your variables. It should be...
Application.worksheetfunction.Max(sq)
and the same for Min. HTH. Dave