ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Helpe me NEwbie (https://www.excelbanter.com/excel-programming/343562-helpe-me-newbie.html)

Ambrosia

Helpe me NEwbie
 

Hello People, I'm new

I need help with this complicated thing

Say I have string values of these in each column:

Column1 Column2
----------------------------
definition1 meaning1
definition2 meaning2

I will need transform it to:

definition1
meaning1
definition2
meaning2

And, let the procedure also work for rows with multiple values like:
a b c d
f g h i

To turn like this:

a
b
c
d
e
f
g
h
i

Can you help me? Thanks in ADVAnce!!!


--
Ambrosia
------------------------------------------------------------------------
Ambrosia's Profile: http://www.excelforum.com/member.php...o&userid=28146
View this thread: http://www.excelforum.com/showthread...hreadid=478525


JMB

Helpe me NEwbie
 
If you don't have many rows, you could copy the first row, then select a
different sheet and click edit/paste special - check transpose. This will
put your rows into columns, but you have to do it for each row.

You could also try pasting this macro into a VBA module, then select your
table and run the macro. Be sure to back up your data and make sure there is
nothing below your data table that might get overwritten.

Sub DataToColumn()
Dim DataArray()
Dim i As Long
Dim t As Long

If Selection.Columns.Count * _
Selection.Rows.Count = 1 Then _
Exit Sub

ReDim DataArray(1 To Selection.Rows.Count, _
1 To Selection.Columns.Count)

DataArray = Selection.Value
Selection.Delete

For i = 1 To UBound(DataArray, 1)
For t = 1 To UBound(DataArray, 2)
ActiveCell.Offset((UBound(DataArray, 2) * _
(i - 1)) + t - 1, 0).Value = DataArray(i, t)
Next t
Next i

End Sub




"Ambrosia" wrote:


Hello People, I'm new

I need help with this complicated thing

Say I have string values of these in each column:

Column1 Column2
----------------------------
definition1 meaning1
definition2 meaning2

I will need transform it to:

definition1
meaning1
definition2
meaning2

And, let the procedure also work for rows with multiple values like:
a b c d
f g h i

To turn like this:

a
b
c
d
e
f
g
h
i

Can you help me? Thanks in ADVAnce!!!


--
Ambrosia
------------------------------------------------------------------------
Ambrosia's Profile: http://www.excelforum.com/member.php...o&userid=28146
View this thread: http://www.excelforum.com/showthread...hreadid=478525



Ambrosia[_2_]

Helpe me NEwbie
 

Omigosh! Thanks a lot for your help!!

I'm very happy that my first post was responded to!!! (And all this
time I was uselessly trying to figure out how this works for hours!)

God bless you!


--
Ambrosia
------------------------------------------------------------------------
Ambrosia's Profile: http://www.excelforum.com/member.php...o&userid=28146
View this thread: http://www.excelforum.com/showthread...hreadid=478525



All times are GMT +1. The time now is 04:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com