View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Greg Wilson Greg Wilson is offline
external usenet poster
 
Posts: 747
Default Conditional select and paste

Try:

Sub TransferData()
Dim r1 As Range, r2 As Range
Set r1 = Range("Data_1").Resize(2, Columns.Count)
Set r2 = Range("Data_1_1st_2Rows").Resize(2, Columns.Count)
r2.Value = r1.Value
End Sub

Regards,
Greg

"BrianDP1977" wrote:


I have a range of data (C4:K6) named Data_1. I would like to create code
that will go through this range (or any defined range) and copy the
first two rows of this data to two different rows on the sheet (let's
say these rows are defined by the range C85:K86 and named
Data_1_1st_2rows). However, I don't just need the data pasted to this
range. I need the entire frist two rows of Data_1 pasted into the rows
comprising Data_1_1st_2rows. Thanks.


--
BrianDP1977
------------------------------------------------------------------------
BrianDP1977's Profile: http://www.excelforum.com/member.php...o&userid=29110
View this thread: http://www.excelforum.com/showthread...hreadid=490366