Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Another coping and pasting macro
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Losing Macro When Coping Sheets into a New Book | Excel Discussion (Misc queries) | |||
Help with EMAIL coping and pasting | Excel Discussion (Misc queries) | |||
MACRO COPY/PASTING | Excel Discussion (Misc queries) | |||
macro for pasting | Excel Discussion (Misc queries) | |||
Pasting a value not a formula in a macro | Excel Discussion (Misc queries) |