View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Loop for copying data, then pasting in a continuous row

Here is another

Sub RearrangeData1()
Dim cell as Range, i as Long
i = 0
for each cell in Range("A1:B9")
i = i + 1
cell.copy Cells(1,i)
Next
Range("A2:B9").ClearContents
End Sub

--
Regards,
Tom Ogilvy

"Bhupinder Rayat" wrote:

Hi All,

86.00 88.00
73.00 75.00
84.50 86.50
112.50 114.50
81.25 83.25
112.00 114.00
86.00 88.00
52.50 54.50
64.00 66.00

I have this block of data in sheet1 (i.e. A1 = 86, B1 = 88, A2 = 73, B2 = 75
etc...),

and I want to paste all this data in the first row of sheet2, so I have a
continuous line of data.

E.g 86 would go in A1, 88 in B1, 73 in C1, 75 in D1 and so on...

Is this possible to do using some sort of loop in VBA?

Many Thanks,

Bhupinder.