Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2011, 01:26 AM
Snvlsfoal Snvlsfoal is offline How do I stack columns of data on top of each other? Windows XP How do I stack columns of data on top of each other? Office 2004 for Mac
Banned
How do I stack columns of data on top of each other?
 
Join Date: Jul 2011
Posts: 9
Snvlsfoal is on a distinguished road
Default How do I stack columns of data on top of each other?

I have a matrix of numbers: 256 columns by 256 rows. I'd like to stack all the columns on top of each other to make one long column of 65,536 rows. Can you help me do this efficiently? Thankyou.
Reply With Quote
  #2  
Old 07-29-2011, 10:16 AM
Catalin.B Catalin.B is offline How do I stack columns of data on top of each other? Windows Vista How do I stack columns of data on top of each other? Office 2007
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

you can use this macro for a start...(same macro in file attached)

Sub Copycol()
Dim Wks As Worksheet
Dim nextRow As Long
Set Wks = Worksheets("Foaie1")
Dim j As Integer

Dim Myrange As Range
Application.ScreenUpdating = False

For j = 1 To 256

Set Myrange = Range(Wks.Cells(1, j), Wks.Cells(256, j))

nextRow = Sheets("Foaie2").Range("A" & rows.Count).End(xlUp).row + 1
Myrange.Copy
Sheets("Foaie2").Range("A" & nextRow).PasteSpecial (xlPasteValues)


Next j


Application.ScreenUpdating = True
End Sub
Attached Files
File Type: xlsm sample.xlsm (16.6 KB, 17 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I stack columns of data on top of each other? Cannot enter data in certain columns of tables HipHopapotamus Word Tables 1 05-02-2011 06:57 PM
How do I stack columns of data on top of each other? moving data from single to multiple columns? mzimmers Excel 3 08-23-2010 08:20 AM
Can I do this? sorting data in seperate columns shumonsaha Excel 0 07-04-2010 03:05 AM
macro for comparing data from 3 columns and pasting into another worksheet ashukla Excel 1 06-24-2009 05:01 PM
How do I stack columns of data on top of each other? Compare data in different columns in an Excel sheet kgfendi Excel 5 05-16-2009 05:42 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft