PC Review


Reply
Thread Tools Rate Thread

copy and paste data from different sheets

 
 
johncaleb
Guest
Posts: n/a
 
      6th May 2010
i have data on sheet 1 in range A1 to C100. I need a macro to copy all the
data starting from the bottom (which in this case is at row 100) going up 73
rows. then paste it on sheet 2 starting at cell A1. Then another macro to
select / copy the rest of data from row 72 up from sheet 1, and paste on
sheet 2 at cell E1.

Depending on my data, the macro needs to select at the very bottom row all
the time because the data range can change from C100 as above to C200. No
matter what, it would have to copy and paste the bottom 73 rows first.

Help would be much appreciated.
thanks


 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      6th May 2010
Modify to suit

Sub copybottom72()
mc = 2
Set ds = Sheets("sheet11")
lr = Cells(Rows.Count, mc).End(xlUp).Row
Cells(lr - 4, mc).Resize(4, 0).Copy ds.Cells(1, "d")
Cells(1, mc).Resize(lr - 4, 0).Copy ds.Cells(1, "e")
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"johncaleb" <(E-Mail Removed)> wrote in message
news:BAB29570-06E5-4C1D-86B3-(E-Mail Removed)...
>i have data on sheet 1 in range A1 to C100. I need a macro to copy all the
> data starting from the bottom (which in this case is at row 100) going up
> 73
> rows. then paste it on sheet 2 starting at cell A1. Then another macro
> to
> select / copy the rest of data from row 72 up from sheet 1, and paste on
> sheet 2 at cell E1.
>
> Depending on my data, the macro needs to select at the very bottom row all
> the time because the data range can change from C100 as above to C200. No
> matter what, it would have to copy and paste the bottom 73 rows first.
>
> Help would be much appreciated.
> thanks
>
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare two wk sheets with common data using copy paste macro =?Utf-8?B?Y29uZWpv?= Microsoft Excel Worksheet Functions 0 8th Oct 2007 09:21 AM
Copy&paste of several sheets Lorenz Microsoft Excel Programming 3 31st May 2007 05:09 PM
Copy&paste of several sheets Lorenz Microsoft Excel Misc 1 29th May 2007 10:08 PM
Copy-Paste between sheets in dif WB's =?Utf-8?B?a29ucGVnbw==?= Microsoft Excel Programming 2 5th Nov 2004 12:34 PM
macro to copy and paste data from multiple sheets paritoshmehta Microsoft Excel Programming 1 31st Mar 2004 01:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:11 AM.