iterate my rows

  • Thread starter Thread starter rodchar
  • Start date Start date
R

rodchar

hi all,

let's say i have 2 rows and 2 columns

row1col1 row1col2
row2col1 row2col2

is there a way in a macro or something to iterate each row, taking each
column and adding it to a new single column? so the result would look like
the following

row1col1
row1col2
row2col1
row2col2


thanks,
rodchar
 
Hi Rodchar,

How's this?

Option Explicit
Sub One_Column()
Dim Cell As Range, PasteRange As Range
Set PasteRange = Range("D1")
For Each Cell In Range("A1:B2")
PasteRange = Cell
Set PasteRange = PasteRange.Offset(1, 0)
Next Cell
End Sub

Will copy A1:B2 into column D

Cheers,
JF
 
that work's for me,
thanks for the help.

rod.

Hi Rodchar,

How's this?

Option Explicit
Sub One_Column()
Dim Cell As Range, PasteRange As Range
Set PasteRange = Range("D1")
For Each Cell In Range("A1:B2")
PasteRange = Cell
Set PasteRange = PasteRange.Offset(1, 0)
Next Cell
End Sub

Will copy A1:B2 into column D

Cheers,
JF
 
Back
Top