Another coping and pasting macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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

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

Back
Top