Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Working with large group of numbers in a column

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Working with large group of numbers in a column

Place the following formula in B1

=OFFSET($A$1,2*(ROW(A1)-ROW($A$1)),0)

and the following in C1

=OFFSET($A$1,2*(ROW(A1)-ROW($A$1))+1,0)

Copy the two formulas down as far as necessary. Select the formulas and use
Edit|Copy then Edit|Paste Special and choose the Values option to convert
the formulas to numbers. Now delete the A column.

The above formulas can be used on any column of numbers and it does not need
to start in row 1. Just change the A1 and $A$1 references to the first cell
in the column of numbers.

--
John Green
Sydney
Australia


"hornsby" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort Not Working on Column of Numbers therube Excel Worksheet Functions 4 February 9th 09 01:45 PM
How can I convert a group of numbers to a group of letters? CarlG Excel Worksheet Functions 9 August 18th 06 03:31 PM
how to change a formula for a large group of cells Jen Excel Worksheet Functions 1 October 2nd 05 04:42 PM
large numbers not losing the end without formatting column Kevin Excel Discussion (Misc queries) 4 September 14th 05 09:21 PM
Working with a large group of numbers Majoe4 Excel Worksheet Functions 1 December 10th 04 07:29 PM


All times are GMT +1. The time now is 04:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"