You won't get very far with your question or your answers if you
get rows and columns mixed up. Rows: 1, 2, 3 Columns: A, B, C
What version of Excel do you have. With Excel 97 and up if you
chose multiple selections the cells can all be accessed as if they
were a single selection. The cells are returned to you left to
right and then left to right from the next row in a selection, etc.,
then the same for next selection.
Since there are only 256 columns, I will assume you did mean
rows as you said, even though your example ran across one
row changing the column.
Public Sub Sel_toSRows()
'Selection(s) to single rows on new sheet
'David McRitchie 2004-11-19
Dim nRow As Long, Cell As Range, rng As Range
Set rng = Selection
Sheets.Add After:=Sheets(Sheets.Count) '-- place at end
Set wsNew = ActiveSheet
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each Cell In rng
nRow = nRow + 1
Cells(nRow, 1) = Cell.Value
Next Cell
Cells.EntireColumn.AutoFit
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages:
http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:
http://www.mvps.org/dmcritchie/excel/search.htm
"captkiwi" wrote
i have a excel workbook with different sheets.
I would like to copy from al these sheets certain cells (in total
35cells) wich are interresting to me
( like for example data sheet 1 cell D24 - sheet2 Cell d1:d5 and f13 ).
after the selection i would like to copy all these cells from these
different sheets into a new excel file/workbook.
every cell data must be in a different row like A1,B1,C1,D1,E1,F1 ....
so i get 1 line with data?