juliet_jia
New Member
- Joined
- Sep 1, 2011
- Messages
- 7
Hi everybody,
I'm trying to loop through a column which consists of blocks of empty and text cells. I need to get the first and last cell of each blocks which have values in the cells. The (simplified) macro looks something like this:
For i = 1 To j
x(1) = 2
x(i) = Cells(x(i), 22).End(xlDown).row
Next i
But I get application or object-defined error. Can anyone tells what's wrong?
Thanks
I'm trying to loop through a column which consists of blocks of empty and text cells. I need to get the first and last cell of each blocks which have values in the cells. The (simplified) macro looks something like this:
For i = 1 To j
x(1) = 2
x(i) = Cells(x(i), 22).End(xlDown).row
Next i
But I get application or object-defined error. Can anyone tells what's wrong?
Thanks