Excel Macro for copy paste columns of data from many columns into one column

questionmansm

New Member
Joined
Jul 1, 2014
Messages
2
Hi, I am a newbie here.


I've been searching here, but can't find the exact thing. I know how to do macros somewhat but am a bit rusty with it and having a hard time.


Basically, here is what I am trying to do. I hope someone here can help.


I have a workbook with 250 columns, each column has the same amount of rows. I want to copy each column into column A.


So, column A has data in rows (A1 to A15) as values, then
(A16 to A30) will have column B data copy & pasted as values,
(A30 to A45) have column C data copy & pasted as values, and the list goes on.



Can someone please help with this? Thanks!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Copy this to your standard code module1.
Code:
Sub lineEmUp()
Dim sh As Worksheet, lc As Long
Set sh = Sheets(1) 'Edit sheet name
lc = sh.Cells.Find("*", sh.Range("A1"), xlFormulas, xlPart, xlByRows, xlPrevious).Column
    For i = 2 To lc
        sh.Cells(1, i).Resize(15, 1).Cut sh.Cells(Rows.Count, 1).End(xlUp)(2)
    Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

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
Back
Top