Merge data from multiple columns onto 1 column

anglais428

Well-known Member
Joined
Nov 23, 2009
Messages
634
Office Version
  1. 2016
Platform
  1. Windows
Hi guys,

I'm assuming this will be a macro but I have a spreadsheet with data starting in cell C1 and ending in BV290. In column C I have information that ranges from C1:C9, in Column D D1:D5, and so on until Column BV. What I would like to do is have all the data displayed in one column (Column A). So Column A would have (in A1) the value in C1, in A2 the value of C2...., in A10 the value of D1 etc.

Any help would be great,

Thanks,
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

gsbelbin

Active Member
Joined
Aug 29, 2008
Messages
336
You could try this VBA

Code:
    Dim lintRow As Long
    Dim i As Integer
    Dim j As Integer
 
    lintRow = 1
    i = 1
    j = 3
 
    With Worksheets("Sheet1")
        Do Until Cells(i, j).Value = ""
            Do Until Cells(i, j).Value = ""
                Cells(lintRow, 1).Value = Cells(i, j).Value
                lintRow = lintRow + 1
                i = i + 1
            Loop
            j = j + 1
            i = 1
        Loop
    End With
 

MickG

MrExcel MVP
Joined
Jan 9, 2008
Messages
14,841
Hi, Try :-
Code:
[COLOR="Navy"]Sub[/COLOR] MG05Aug04
[COLOR="Navy"]Dim[/COLOR] rng [COLOR="Navy"]As[/COLOR] Range
[COLOR="Navy"]Dim[/COLOR] c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Integer[/COLOR]
[COLOR="Navy"]Dim[/COLOR] Ac [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Integer[/COLOR]
[COLOR="Navy"]Set[/COLOR] rng = Range("C1:BV290")
c = 1
[COLOR="Navy"]For[/COLOR] Ac = 1 To 72
    Range("A" & c).Resize(290) = Application.Index(rng.Value, , Ac)
    c = c + 290
[COLOR="Navy"]Next[/COLOR] Ac
[COLOR="Navy"]Set[/COLOR] rng = Range(Range("A1"), Range("A" & Rows.Count).End(xlUp))
rng.SpecialCells(xlCellTypeBlanks).Delete shift:=xlUp
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 

anglais428

Well-known Member
Joined
Nov 23, 2009
Messages
634
Office Version
  1. 2016
Platform
  1. Windows
Thanks to you both, working great!
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,898
Messages
5,834,295
Members
430,274
Latest member
TME1993

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top