Hi all,
I use the End(xldown).Row for splitting up a a file on import.
With ActiveSheet
LastCell8 = .Range("h1").End(xlDown).Row
.Range("m1").Copy
.Range("m2:m" & LastCell8).Select
.Paste
End With
However sometimes the import file is only 1 row and it ends up
selecting all 65,000 rows ...
Any thoughts how I can work this out bearing in mind I've already
written code using the above.
Thanks.
Ed
RB Smissaert - 12 Sep 2007 20:59 GMT
Use something like Cells(8, 65536).End(xlUp).Row
RBS
> Hi all,
>
[quoted text clipped - 17 lines]
>
> Ed
David Hilberg - 12 Sep 2007 21:11 GMT
Substitute this line:
lastcell8 = .Range("h1").End(xlDown).End(xlDown).End(xlUp).Row
- David
> Hi all,
>
[quoted text clipped - 17 lines]
>
> Ed