#1   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 1
Default Paste rows in macro

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.
  #2   Report Post  
Posted to microsoft.public.excel.setup
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.


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
Macro to find and paste rows kayabob Excel Discussion (Misc queries) 4 February 21st 07 01:50 AM
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows Scott Excel Worksheet Functions 0 December 13th 06 01:25 AM
Macro to: Find a Reference, and then Paste into the 10 Rows Below Blobbies Excel Discussion (Misc queries) 9 March 14th 06 11:17 AM
Hide Rows - copy and paste only rows that show Access101 Excel Worksheet Functions 3 March 1st 06 12:39 AM
flexible paste rows function that inserts the right number of rows marika1981 Excel Discussion (Misc queries) 1 February 18th 05 02:40 AM


All times are GMT +1. The time now is 12:31 AM.

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"