Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Controlling odd even rows when pasting data
|
#2
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
pasting excel data in a powerpoint slide | Excel Discussion (Misc queries) | |||
How to use outline data (grouped rows) in a protected worksheet? | Excel Discussion (Misc queries) | |||
Pulling data from 1 sheet to another | Excel Worksheet Functions | |||
Multiple rows of data on a single axis (charting) | Charts and Charting in Excel | |||
how do i merge 2 rows of data into one | Excel Discussion (Misc queries) |