I"ve tried the methods suggested by all of you
but it didn't help.
first of all, I declared i and k as double but still got mismatch
error.
secondly, I used the function sum(A2:A100), but it was reported that
there was a syntax error.
lastly, I wanna calculate the sums of the columns respectively, I'm
afraid using Do while activecell.value <>"" would result in a sum of
all of the cells in the worksheet.
So, I haven't had my problem resolved. But I appreciate all the
suggestions. Any more leads?