ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to marge many columns to single column (https://www.excelbanter.com/excel-discussion-misc-queries/192133-how-marge-many-columns-single-column.html)

alansi

how to marge many columns to single column
 
Dear friends i have many paralled columns that i want to converte it to
single column by making each column follow the other. for example

A E I
B F J
C G K
D H L

i want to change it to single column without copy and past because i have
too many columns.
as follow

A
B
C
D
E
F
G
H
I
J
K
L

any idea how to make it in excle

thanks

Don Guillett

how to marge many columns to single column
 
Sub allcolumnstoa()
lc = Cells.SpecialCells(xlCellTypeLastCell).Column
For i = 2 To lc
slr = Cells(Rows.Count, i).End(xlUp).Row
dlr = Cells(Rows.Count, "a").End(xlUp).Row + 1
Range(Cells(1, i), Cells(slr, i)).Copy Cells(dlr, "a")
Next i
'below line deletes old columns
Range(Cells(1, 2), Cells(1, lc)).EntireColumn.Delete
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"alansi" wrote in message
...
Dear friends i have many paralled columns that i want to converte it to
single column by making each column follow the other. for example

A E I
B F J
C G K
D H L

i want to change it to single column without copy and past because i have
too many columns.
as follow

A
B
C
D
E
F
G
H
I
J
K
L

any idea how to make it in excle

thanks




All times are GMT +1. The time now is 11:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com