+ Reply to Thread
Results 1 to 3 of 3

Helpe me NEwbie

  1. #1
    Registered User
    Join Date
    10-16-2005
    Posts
    11

    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!!!

  2. #2
    JMB
    Guest

    RE: 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. #3
    Registered User
    Join Date
    10-16-2005
    Posts
    11
    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!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1