View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
isabelle isabelle is offline
external usenet poster
 
Posts: 587
Default merging multple columns into one column (dynamically)

i forgot to tell you that i assume that each column was named according to the
title line (list1 list2 List3...)

isabelle

Le 2014-07-25 22:47, isabelle a écrit :
hi,

Dim MergeList(), i As Integer, c As Range, n As Integer
For i = 1 To Cells(1, Cells.Columns.Count).End(xlToLeft).Column
For Each c In Range(Cells(1, i))
n = n + 1
ReDim Preserve MergeList(n)
MergeList(n) = c
Next
Next
Sheets("MergeListSheet").[A1].Resize(UBound(MergeList) + 1) =
Application.Transpose(MergeList) '---adapt name sheet

isabelle