Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
This might do what you're after - but make sure the data starts in cell A1. Dan. Option Explicit Sub ToOneColumn() Dim cntI As Integer Dim cntJ As Integer Dim TotalRows As Integer Dim TotalCols As Integer TotalRows = ActiveSheet.UsedRange.Rows.Count TotalCols = ActiveSheet.UsedRange.Columns.Count For cntJ = 2 To TotalCols Cells(1, cntJ).Select Range(Selection, Selection.End(xlDown)).Select Selection.Cut Cells((cntJ - 1) * TotalRows + 1, 1).Select ActiveSheet.Paste Next cntJ Cells(1, 1).Select End Sub "vlad" wrote: I have 10+ columns of data. I need to have all columns merged one under another into one column.For example column A. I can do it manually by cutting the data in each column and pasting it below the last record in column A. But there should be a way to automate that.Any help with the code will be apprciated |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Merge Columns | Excel Discussion (Misc queries) | |||
Merge Columns | Excel Discussion (Misc queries) | |||
merge text from 2 columns into 1 then delete the old 2 columns | Excel Worksheet Functions | |||
How to merge columns from excel and how to set customize each columns | Excel Programming | |||
I want to merge two columns | New Users to Excel |