Neutralizer, your code runs fine in my XL 2010 environment.
UNLESS
If either row 1 is completely empty OR column A is completely empty. Then your code bombs, because the count is 0 and that does not compute with Cells().
You have to make sure that there are values there to count.
The end(XLToLeft) does have its advantages. This code works, even if all cells are empty:
Note that the variables are Long instead of Integer, because an integer does not cover the whole range of possible row numbers.
cheers
Bookmarks