CopyIntoFirstEmptyRowHorizontally
Mike
Try this
Sub Test()
Dim c As Variant
Dim rng1 As Range
Dim dest As Long, i As Long, r As Long
Set rng1 = Sheets("A").Range("B1:B20")
With Sheets("B")
dest = Application.WorksheetFunction.CountA(Range
("A:A")) + 1
End With
i = 1
For Each c In rng1
Cells(dest, i).Value = c
i = i + 1
Next c
End Sub
Regards
Peter
-----Original Message-----
I hope someone can help.
I need to write a macro to do the following:
I have worksheet A, which I want to copy the values of
Cells B1:B20
The macro will search worksheet B for the first empty row
starting with row A2.
Then copy worksheet A, cells b1:b20 into worksheet B
HORIZONTALLY in cells A2:T2
thanks
Mike
.
|