Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 *** |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 *** |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting the Last row
|
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting every 4th row | Excel Discussion (Misc queries) | |||
selecting a row | Excel Worksheet Functions | |||
Selecting | Excel Programming | |||
Selecting The Last Row | Excel Programming | |||
Selecting every odd row | Excel Discussion (Misc queries) |