?
Solved

reorder data

Posted on 2014-02-18
5
Medium Priority
?
189 Views
Last Modified: 2014-02-19
is there an easy way in excel, to re-order data. essentially into a single column (A) I need to "merge" two columns (B and C).

I need to copy data from columns B and column C into column A, however they need to be copied in a sequential order, so

A1 needs to be a copy of B1
A2 needs to be a copy of C1
A3 needs to be a copy of B2
A4 needs to be a copy of C2
A5 needs to be a copy of B3
A6 needs to be a copy of C3

etc. is this possible?
0
Comment
Question by:pma111
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 31

Accepted Solution

by:
gowflow earned 668 total points
ID: 39867838
Yes thru VBA this code should do it

Sub TransferBCToA()
Dim WS As Worksheet
Dim MaxRow As Long, I As Long
Dim cCell As Range

Set WS = ActiveSheet
MaxRow = WS.UsedRange.Rows.Count
I = 1

For Each cCell In WS.Range("B1:C" & MaxRow)
    WS.Cells(I, "A") = cCell
    I = I + 1
Next cCell
End Sub

Open in new window


check the attached file and activate macros and hit the button.
gowflow
TransferBCtoA.xls
0
 
LVL 33

Assisted Solution

by:Rob Henson
Rob Henson earned 668 total points
ID: 39867872
Without VBA:

Insert a column between the two columns.
In the new column and alongside the other column, against each row put a column of incrementing numbers, ie row 1 to 100.

Then copy the second column of data with its row reference below the first set.

You will then have rows 1 to 100 twice. You can the sort on the number column and both number 1's will sort together, number 2's together etc.

Thanks
Rob H
0
 
LVL 52

Assisted Solution

by:Rgonzo1971
Rgonzo1971 earned 664 total points
ID: 39867919
Hi,

or with a formula

=INDIRECT(ADDRESS((ROW(A1)+1)/2-1+1,2+MOD(ROW(A1)-1,2)))

Open in new window


Regards
EE20140218.xlsx
0
 
LVL 3

Author Comment

by:pma111
ID: 39867944
many thanks
0
 
LVL 31

Expert Comment

by:gowflow
ID: 39869730
Did you had a chance to check the proposed solutions ?
gowflow
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question