2 columns -> 1 column

D

Danny Barak

Hello all
I have 2 columns and i want to make a 1 column as follows:
a b a
c d b
e f => c
g h d
i j e
.. f
.. g
.. h
.. i
.. j

Any help would be appreciated.
Danny
 
G

Gord Dibben

Danny

Sub CombineCols()
''combine 2 columns to one with data from Col 2 being inserted
''between data from Col 1
Do Until ActiveCell.Value = ""
ActiveCell.Offset(1, 0).EntireRow.Select
ActiveCell.EntireRow.Insert
ActiveCell.Select
ActiveCell.Value = ActiveCell.Offset(-1, 1).Value
ActiveCell.Offset(-1, 1).Value = ""
ActiveCell.Offset(1, 0).Select
Loop
End Sub

Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top