Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 385
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

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
Losing Macro When Coping Sheets into a New Book Vick Excel Discussion (Misc queries) 3 May 15th 08 10:59 PM
Help with EMAIL coping and pasting patti Excel Discussion (Misc queries) 0 March 6th 07 10:12 PM
MACRO COPY/PASTING GILBERT Excel Discussion (Misc queries) 1 August 31st 06 04:55 AM
macro for pasting CMD Excel Discussion (Misc queries) 2 May 26th 06 10:03 PM
Pasting a value not a formula in a macro Alec H Excel Discussion (Misc queries) 1 February 23rd 06 10:58 AM


All times are GMT +1. The time now is 10:04 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"