Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All
I have data in column A1 to A2564. I want to take every other line ie(A1, A3, A5, etc) and copy that to match the even columns in column B. ie (A2 would go into B1, A4 would go into B3, etc. So it is taking the value in every other line and copying it and moving it up one cell and over one cell. Thanks! Roy Example A1 1 A2 2 A3 3 A4 4 Result Al 1 B1 2 A2 now blank A3 3 B3 3 A4 blank now |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sounds like a lot of work to do each one with the mouse! If I understand
correctly you want to move data from A2 to B1, A4 to B3, and etc.. You do not want to leave data in A2, A4, A6, etc. I have this code setting A2, A4, A6 etc to Empty, which effectively deletes the content in those cells. try this: in a module of VB... Private Sub moveitems() Dim n As Integer n = 1 Do Until n 2654 Cells(n, 2) = Cells(n + 1, 1) 'move the data Cells(n + 1, 1) = Empty 'delete the original data n = n + 2 'increase the counter by two to get every other line Loop End Sub " wrote: Hi All I have data in column A1 to A2564. I want to take every other line ie(A1, A3, A5, etc) and copy that to match the even columns in column B. ie (A2 would go into B1, A4 would go into B3, etc. So it is taking the value in every other line and copying it and moving it up one cell and over one cell. Thanks! Roy Example A1 1 A2 2 A3 3 A4 4 Result Al 1 B1 2 A2 now blank A3 3 B3 3 A4 blank now |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying everything | New Users to Excel | |||
copying the Hyperlink function result without copying the actual formula | Excel Worksheet Functions | |||
copying | Excel Programming | |||
TextBox copying not like windows copying, heh? | Excel Programming | |||
Copying data down to next dirty cell, then copying that data | Excel Programming |