View Single Post
  #2   Report Post  
Jim Cone
 
Posts: n/a
Default

John,

This code does the data transfer for the even rows only...

'---------------------------------------
'Transfer data from each row in rngTwo into
'the even numbered rows in rng one.
'Jim Cone - San Francisco, USA - Feb 23, 2005

Sub OddManOut()
Dim lngR As Long
Dim lngN As Long
Dim rngOne As Excel.Range
Dim rngTwo As Excel.Range

'rngOne must be have twice as many rows as rngTwo
Set rngOne = Range("A1:D40") 'Change to the applicable range
Set rngTwo = Range("E1:H20") 'ditto

For lngR = 1 To rngOne.Rows.Count
If rngOne.Rows(lngR).Row Mod 2 = 0 Then
lngN = lngN + 1
rngOne.Rows(lngR).Value = rngTwo.Rows(lngN).Value
End If
Next 'lngR
End Sub
'---------------------------------------
Regards,
Jim Cone
San Francisco, USA



"

wrote in message ...

I want to paste data into an excel sheet.
But I want to paste one large amount of data into even rows, then an equally
large amount of it into odd rows.
How do I direct the data to be pasted to only the assigned rows?
est 3000 to five thousand rows of data into each paste.
Thanks in advance