Selecting the Last row

D

Darin Kramer

Howdie!

Using Rons code below, the last row is correctly identified, (and pops
up in the msg box), but I want to copy some data (from sheet called
"master", say cells a1:c1) into the three cells directly beneath the
last row... Any ideas...?

Sub LastCellInOneColumn()

Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
MsgBox LastRow

End Sub

Regards

Darin

*** Sent via Developersdex http://www.developersdex.com ***
 
B

Bob Phillips

Sub LastCellInOneColumn()

Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
Worksheets("Master").Range("A1:C1").Copy .Cells(LastRow+1,"A")
End With
MsgBox LastRow

End Sub


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
V

Vergel Adriano

After this line
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

Add this

Sheets("master").Range("A1:C1").Copy .Range("A" & lastrow+1)
 
M

Mike

Try this

Sub LastCellInOneColumn()
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
For x = 1 To 3
Cells(LastRow + x, 1).Value = Worksheets("master").Cells(1, x).Value
Next

End Sub
 

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

Top