Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sort Not Working on Column of Numbers | Excel Worksheet Functions | |||
How can I convert a group of numbers to a group of letters? | Excel Worksheet Functions | |||
how to change a formula for a large group of cells | Excel Worksheet Functions | |||
large numbers not losing the end without formatting column | Excel Discussion (Misc queries) | |||
Working with a large group of numbers | Excel Worksheet Functions |