+ Reply to Thread
Results 1 to 5 of 5

Transpose multiple rows to multiple columns

  1. #1
    Registered User
    Join Date
    02-04-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Transpose multiple rows to multiple columns

    Am new to Excel forum... so a big hello to everyone.

    I need help transposing data from multiple rows to multiple columns.
    The data i have, looks like this


    ABC Company
    John Doe
    Anytown
    (000)000-0000

    wwwww
    eeeee
    rrrrr
    ttt
    yyy
    uuu

    ww
    eee
    fff
    ggg
    hhh

    asds
    vxcvx
    sefs

    aaaa
    gggg
    hhh
    uuuuu
    oooo
    ppppp


    Is there a formula or macro i can use for the data to look like this

    ABC Company ABC Company John Doe Anytown (000)000-0000 #N/A #N/A #N/A
    John Doe
    Anytown
    (000)000-0000

    wwwww wwwww eeeee rrrrr ttt yyy uuu #N/A
    eeeee
    rrrrr
    ttt
    yyy
    uuu

    ww ww eee fff ggg hhh #N/A #N/A
    eee
    fff
    ggg
    hhh

    asds asds vxcvx sefs #N/A #N/A #N/A #N/A
    vxcvx
    sefs

    aaaa aaaa gggg hhh uuuuu oooo ppppp #N/A
    gggg
    hhh
    uuuuu
    oooo
    ppppp


    I can use transpose but this file consists of 70,000 companies, names and addresses, so doing this manually seems impossible.

    Any ideas?

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Transpose multiple rows to multiple columns

    Maybe with this one.

    You need to change it for your need.

    Test it on a dummy of your sheet.

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    02-04-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Transpose multiple rows to multiple columns

    Thanks Oeldere

    I must admit am not very good with Macro's.. but this is what i've tried so far.

    I have edited and pasted your code an on existing Macro (!!!, not sure if i did the right thing) and i also added another column that i somehow seems to do a trick, but not quiet what i was hoping.

    I have attached the file, sheet one is what it look like before i run the MACRO and sheet2 is after the marco is run.

    Any ideas?plumbers2.xlsm

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Transpose multiple rows to multiple columns

    See the attached file.

    1) Sub filldata_acending_incolumnA()
    2) Sub Delete_empty_rows_in_collumnB()
    3) Sub Consolidate_2()

    The result you see in the file.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-04-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Transpose multiple rows to multiple columns

    WoW!!.... that worked Oeldere!!!... you saved me!.

    I did try
    1) Sub filldata_acending_incolumnA()
    2) Sub Delete_empty_rows_in_collumnB()
    3) Sub Consolidate_2()

    For some reason taht gave me a debug error

    So i tried it in this order

    1) Sub Delete_empty_rows_in_collumnB()
    2) Sub filldata_acending_incolumnA()
    3) Sub Consolidate_2()

    Worked just fine!

    Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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