View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Another coping and pasting macro

Hi(again!),

Sub PostGwrStmt()

Dim iRow As Long
Dim ws As Worksheet

Set ws = Worksheets("GrowerDatabase")

' find first empty row in database

iRow = ws.Cells(Rows.Count, 1) .End(xlUp).Offset(1, 0).Row

Worksheets("GwrStmts").Range("GwrStmt").Copy ws.Cells(iRow, 1)

End Sub


HTH

"Jennifer" wrote:

My feable attempt at writing this. Very apperent to me that i need more help.
I have a worksheet (GwrStmts.) with a named range GwrStmt that I would like
to copy and paste on Worksheet ("GrowerDatabase") a row after the last entry.
What am i missing? Thank you once again. Jennifer

Sub PostGwrStmt()
With Worksheets("GwrStmts.")
Range("GwrStmt").Copy
End With
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("GrowerDatabase")

' find first empty row in database
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row
Range("GwrStmt").PasteSpecial Paste:=xlPasteFormulasAndNumberFormats,
Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Sheets("GwrStmts.").Select
End Sub
--
Though daily learning, I LOVE EXCEL!
Jennifer