contents of cells to rows
Hi Radiolistener,
I think u misunderstanding. I need the contents of the cell to be seperated
into rows, not columns. The way i did it was to use text to columns and then
transpose them. I want to know if there is a way to do it without using the
text to column.
eg (52221, 52222, 52223) What i would like is:
A 52221
B 52222
C 52223
Is this possible? Is this what you sent me?
--
--------
"Radiolistener" wrote:
Hi Hardworker,
Say you make a macro enabled worksheet. In A2 put "5,6,7,8" in Column C2,
go into developer and pick insert, add a button.
In the button code, put the following:
Sub Button1_Click()
Dim texter As String
Dim datatocolumn() As String
texter = Sheet1.Range("A2")
datatocolumn = Split(texter, ",")
Dim i As Integer
i = 5
Dim item As Variant
For Each item In datatocolumn
Sheet1.Range("A" & Trim(Str(i))).Value = item
i = i + 1
Next item
End Sub
That would do it, but I'm really not sure why you wouldn't want to use text
to column.
In any event, I hope that this is the answer you are looking for.
John
"Hardworker" wrote:
hi,
is it possible to convert the contents of cells to rows eg. i have rows of
cells which contains numbers seperated by a comma (542212, 542213, 542214
etc).
Is there a way of doing this without using the text to column first?
|