Is there a built in way to select all cells in sheet that contain data?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Right now I'm copying cells from one worksheet to another with static references (ie Rows("1:2510")

Is there an easy way to select a range of rows that have data on them (because there could be more rows in the future, I want to make the program more flexible.) Ie. if after rows 2510 there is no more data, select the range until this point

I could code a way of doing it, but just wanted to see if there was a built in way of doing so

Thanks

Matt Lawson
 
Hi Matt
one way (for the used range):
Activesheet.usedrange.copy

or for the entire rows
Activesheet.usedrange.entirerow.copy
 
Back
Top