ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selecting the Last row (https://www.excelbanter.com/excel-programming/384727-selecting-last-row.html)

Darin Kramer

Selecting the Last row
 


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 ***

Bob Phillips

Selecting the Last row
 
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)



"Darin Kramer" wrote in message
...


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 ***




Vergel Adriano

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

Add this

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



"Darin Kramer" wrote:



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 ***


Mike

Selecting the Last row
 
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

"Darin Kramer" wrote:



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 ***


Darin Kramer

Selecting the Last row
 

BRILLIANT!!!! THANKS!!!!


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

Ron de Bruin

Selecting the Last row
 
I will add a few more examples soon on the page Darin.
Maybe useful
http://www.rondebruin.nl/last.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Darin Kramer" wrote in message ...

BRILLIANT!!!! THANKS!!!!


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



All times are GMT +1. The time now is 07:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com