Copy Until Blank

  • Thread starter Thread starter Alec
  • Start date Start date
A

Alec

I have a sheet where the number of rows may vary in a
range, I need to copy this range to another sheet. But I
cannot find any function that will give me the first empty
row in a range, or empty cell in a column.

Any help would be appreciated.

Thanks
Alec
 
Thanks for your reply Mike:

However I do not want to copy the whole used range, but a
number columns within that range.
 
Does this help?

x=cells(65536,"a").end(xldown).row
y=cells(1,"IV").end(xltoright).column
 
Thanks Don;

The End statement works fine.



-----Original Message-----

Does this help?

x=cells(65536,"a").end(xldown).row
y=cells(1,"IV").end(xltoright).column




.
 
Actually, the y one is incorrect
y=cells(1,"IV").end(xltoright).column
y=cells(1,"IV").end(xltoLEFT).column OR
y=cells(1,1).end(xltoright).column
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top