Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
How can I take a large block of data (A1:Y300 which is 24 cols, 300 rows or 7200 cells of data) and paste that data into another sheet but only into one column (so I get the 7200 data cells all in one column from say B1:B7200. thank you!! Craig |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sub zalatw()
'just qiuck and dirty '1. select yr range A1:Y300 first '2. copy it and paste special with TRANSPOSE to another location '3. Select the range you have pasted '4. run the macro Sheets("Sheet2").Columns(2).ClearContents With ActiveSheet For i = 0 To Selection.Columns.Count - 1 For j = 1 To Selection.Rows.Count counter = counter + 1 Sheets("Sheet2").Cells(licznik, 2) = Selection.Cells(counter) Next j Next i 'Optional: 5. delete transposed range 'Selection..ClearContents End With End Sub HIH |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
oops
this one is better Sub zalatw() 'just qiuck and dirty '1. select yr range A1:Y300 first '2. run the macro '3. result will be inserted into Sheet2 Sheets("Sheet2").Cells.ClearContents Selection.Copy col = Selection.Columns.Count roww = Selection.Rows.Count Sheets("Sheet2").Range("D1").PasteSpecial Paste:=xlValues, Transpose:=True Sheets("Sheet2").Range(Range("D1"), Range("D1").Offset(col - 1, roww - 1)).Select With Selection For i = 0 To Selection.Columns.Count - 1 For j = 1 To Selection.Rows.Count counter = counter + 1 Sheets("Sheet2").Cells(counter, 2) = Selection.Cells(counter) Next j Next i Sheets("Sheet2").Range(Range("D1"), Range("D1").Offset(col - 1, roww - 1)).ClearContents Application.CutCopyMode = False End With End Sub |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Craig
That would 25 cols and 300 rows for 7500 cells. Sub ToOneColumn() Dim cntI As Integer Dim cntJ As Integer Dim TotalRows As Integer Dim TotalCols As Integer With Range("A1:Y300") TotalRows = .Rows.Count TotalCols = .Columns.Count End With 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 Gord Dibben MS Excel MVP On Fri, 15 Aug 2008 06:14:01 -0700, Craig wrote: Hi How can I take a large block of data (A1:Y300 which is 24 cols, 300 rows or 7200 cells of data) and paste that data into another sheet but only into one column (so I get the 7200 data cells all in one column from say B1:B7200. thank you!! Craig |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy & paste block of text number of times equal to value in cell | Excel Worksheet Functions | |||
How to autosize/wrap large text block? | Excel Discussion (Misc queries) | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
copy a block of cells | Excel Discussion (Misc queries) | |||
How to copy block of cells and keep grouping? | Excel Discussion (Misc queries) |