trying to get data from rows to columns
On Sunday, July 15, 2012 9:09:40 AM UTC-5, Kathryn39 wrote:
Hello!
I was wondering if anyone could help me; I have about 200 rows of data,
with about 200 values in each row, but I would like to have the
information that is in each row, to be in a column instead, just
wondering is there a quick way of doing this as opposed to copying and
pasting each of them?
All help appreciated!
thank you,
Kathryn
--
Kathryn39
This should do it
Sub transposeemSAS()
Dim lr As Long
Dim i As Long
lr = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To lr
Rows(i).Copy
Cells(Rows.Count, i).End(xlUp)(2).PasteSpecial _
Paste:=xlPasteAll, Operation:=xlNone, _
SkipBlanks:=False, transpose:=True
'MsgBox i
Next i
Rows(1).Resize(lr).Delete
End Sub
|