Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Selecting the Last row


BRILLIANT!!!! THANKS!!!!


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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting every 4th row Cindy Excel Discussion (Misc queries) 3 January 20th 10 09:46 PM
selecting a row srikanth Excel Worksheet Functions 6 July 17th 07 08:44 AM
Selecting Mark Petruszak Excel Programming 7 August 30th 05 03:41 PM
Selecting The Last Row Minitman[_4_] Excel Programming 15 July 25th 05 03:11 AM
Selecting every odd row instauratio Excel Discussion (Misc queries) 2 June 15th 05 08:27 PM


All times are GMT +1. The time now is 11:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"