Selecting the first empty row

  • Thread starter Thread starter webba
  • Start date Start date
W

webba

How do I select the first empty row in a worksheet?

I'd like to copy a certain range form wksheet 1 and then past that
range into the next available row in wksheet 2.

Thanks!
Weber
 
Hi Webba,

Try something like:

Dim srcRng As Range
Dim destRng As Range

Set srcRng = Sheets("Sheet1").Range("A10:H15")

Set destRng = Sheets("Sheet2"). _
Cells(Rows.Count, "A").End(xlUp)(2)

srcRng.Copy Destination:=destRng
 
Hi KC,
use Sheets("Sheet2").Range("A65536").End(xlUp) as destination will do

Two points:

(1) Your suggestion returns the last populated cell in column A and would
result in some of the OP's data being overwritten.

(2) Suggesting the hardcoded 'Range("A65536").' rather than:

does not strike me as an improvement. However, unless and untlil MS increase
worksheet specifications, it is equivalent.
 
Hi Webba,

Try something like:

Dim srcRng As Range
Dim destRng As Range

Set srcRng = Sheets("Sheet1").Range("A10:A15")

Set destRng = Sheets("Sheet2"). _
Cells(Rows.Count, "A").End(xlUp)(2)

srcRng.Copy
destRng.PasteSpecial , Transpose:=True
 
Hey guys!

Back again..

Now instead of choosing the first available row...

I'd like to choose the first available row BEFORE the total column al
the way on the bottom.

Any help would be great.

Thanks
 
Back
Top