What I do is set a reference to the last cell in the column (I used to say 'When loop finds a blank cell then end but of course when people start inserting lines it goes wrong very quickly. To be honest I don't really understand your code but this is what I do when looping down a column..
'Find last cell in column A by going to cell A65536 then moving up..
LastRow = Range("A65536").End(xlUp).Row
'loop all rows starting from row 2 until the end row
For x = 2 to LastRow
If cells(x,1).value <> "" then
'do some more code
'you probably realise but cells(x,1) means the cell being evaluated is row x (The current row) and column 1 (i.e Column A)
End If
Next
Maybe I've completely misunderstood but let me know if it helps/doesn't make sense
John
Bookmarks