Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Anthony
 
Posts: n/a
Default Copy Worksheet..Howe ??

Hi,

Can anybody give the code to create a macro which will select the entire
contents of worksheet1 (except the headers which are on cells A2:G2) and
paste this onto the next available line on worksheet 2 ??

Easy....uh !!!!!!

thanks/regards
Anthony
  #2   Report Post  
Tom Ogilvy
 
Posts: n/a
Default

Possibly

Sub Macro1()
Dim rng as Range, rng1 as Range
set rng = Application.UsedRange
set rng1 = Range(Range("A3"),rng)
rng1.copy Destination:=worksheets("sheet2").Range("A2")
End sub

--
Regards,
Tom Ogilvy

"Anthony" wrote in message
...
Hi,

Can anybody give the code to create a macro which will select the entire
contents of worksheet1 (except the headers which are on cells A2:G2) and
paste this onto the next available line on worksheet 2 ??

Easy....uh !!!!!!

thanks/regards
Anthony



  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

Anthony

To copy to the first available row, change

rng1.copy Destination:=worksheets("sheet2").Range("A2")

to

rng1.copy Destination:=worksheets("sheet2".Cells(Rows.Count, _
1).End(xlUp).Offset(1, 0)


Gord Dibben Excel MVP

On Tue, 8 Feb 2005 15:34:04 -0500, "Tom Ogilvy" wrote:

Possibly

Sub Macro1()
Dim rng as Range, rng1 as Range
set rng = Application.UsedRange
set rng1 = Range(Range("A3"),rng)
rng1.copy Destination:=worksheets("sheet2").Range("A2")
End sub


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
Copy answer to another worksheet mjohnson0321 Excel Discussion (Misc queries) 3 January 22nd 05 01:11 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
how do I make a copy of a worksheet and retain formulas but not data FireBrick Setting up and Configuration of Excel 2 December 29th 04 07:33 PM
How do I copy page setup from one worksheet & paste into new shee. Rasc0 Excel Discussion (Misc queries) 2 December 1st 04 10:12 PM
Copy worksheet with Pivot Table and break link to original workshe setter-lover Excel Worksheet Functions 0 November 18th 04 09:29 PM


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