View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default Working with large group of numbers in a column

hornsby wrote:
I need to move every other number in a column of numbers to an adjacent
column and then close the gap. Example: Move a2 to b1 and delet row 2, move
a4 to b2 and delete row 4. I need to repeat this task 25,000 times.
Recording a macro doesn't seem to work.

If the functions in the freely downloadable file at
http://home.pacbell.net/beban are available to your workbook

Sub qwerty()
Dim arr
arr = Range("a1:a25000")
arr = ArrayReshape(arr, 12500, 2)
Range("A1").Resize(12500, 2).Value = arr
Range("a12501:a25000").ClearContents
End Sub

Alan Beban