View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.setup
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Paste rows in macro

Sub copy()
Dim pnum As Integer
pnum = Range("P1").Value
ActiveCell.Resize(pnum, 12).copy Destination:=Sheets(2).Range("A1")
End Sub


Gord Dibben MS Excel MVP

On Wed, 20 Aug 2008 13:22:26 -0700, murphy
wrote:

I need to copy and paste rows using macro. Column P has a number in it. That
is the number that I want to copy rows.