I think you can just do something likex = Sum(A1:A100)not sure on the exact syntax to replace the 100 with an 'i' though.