Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
NEWBIE Tom Snyder Excel Discussion (Misc queries) 1 June 8th 07 06:47 PM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
Very newbie Man Utd Excel Programming 1 June 14th 05 07:42 AM
I'm a newbie [email protected] Excel Programming 2 June 8th 05 04:08 PM
Newbie Help ARB Excel Programming 0 October 21st 03 08:20 PM


All times are GMT +1. The time now is 08:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"