+ Reply to Thread
Results 1 to 11 of 11

Thread: transpose different sets of data in rows to columns

  1. #1
    Registered User
    Join Date
    12-23-2010
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    5

    transpose different sets of data in rows to columns

    Dear readers,

    I'm encountering a problem and hope to get some help here, as I am a little stuck.

    I've got several databases 6000 rows long and 30 columns wide in the following way.

    BBED XB Equity
    Date 11/30/2007 12/31/2007
    PX_VOLUME 174408 81221
    TURNOVER 3794133 2105674
    EQY_ 17.876 17.56

    BBED XE Equity
    Date 11/30/2007 12/31/2007
    PX_VOLUME 38238 29950
    TURNOVER 355358 340254
    EQY_ 17.63 16.8

    And then the next set with different equity, but same factors and dates. There is a blank row in between these sets of data. I would like to transpose in such a way that everything ends up under eachother, so like this

    Equity Date Volume Turnover EQY
    BBED XB Equity 11/30/2007 174408 3794133 17.876
    BBED XB Equity 12/31/2007 81221 2105674 17.56
    BBED XE Equity 11/30/2007 38238 355358 17.63
    BBED XE Equity 12/31/2007 29950 340254 16.8

    Is that possible?? I've added an example for some more insight in the situation, I think all is clear now.

    Hope someone can help, great Christmas days for all readers!!

    Regards,

    Balder
    Attached Files Attached Files
    Last edited by bbomans; 12-25-2010 at 11:37 AM.

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,226

    Re: transpose different sets of data in rows to columns

    Click GO ADVANCED and use the paperclip icon to post up a desensitized example set of data from your workbook.

    Make sure the example has accurate BEFORE/AFTER examples, don't make the example too short.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-23-2010
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: transpose different sets of data in rows to columns

    Thanks Jerry, I have added an example for more insight.

  4. #4
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: transpose different sets of data in rows to columns

    Is this an Access or Excel question ?

  5. #5
    Registered User
    Join Date
    12-23-2010
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: transpose different sets of data in rows to columns

    An excel question.

  6. #6
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: transpose different sets of data in rows to columns

    thread moved from Access to Excel Programming Forum - please be sure to post any future questions in an appropriate Forum.

  7. #7
    Valued Forum Contributor
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2003
    Posts
    2,488

    Re: transpose different sets of data in rows to columns

    see attachment, run macro "TR"
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    12-23-2010
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: transpose different sets of data in rows to columns

    Watersev, you're a hero, it works perfect on all my workbooks! Thanks a lot!

  9. #9
    Valued Forum Contributor
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2003
    Posts
    2,488

    Re: transpose different sets of data in rows to columns

    I reviewed my code and found a bloody limitation of 38 columns for the table to be processed. I have corrected that fault of mine. So please treat previous code acceptable for example file and this code as a final one (works with any number of columns used).
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    12-23-2010
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: transpose different sets of data in rows to columns

    Thanks watersev, it works great!

    One more question, which you maybe have a suggestion for.
    I have now all the different venues under each other as done by the macro and would like to extract the middle part to a new cell, or copy or cut, doesnt matter,

    AGN EU Equity
    AGN IX Equity

    AGN Equity EU
    AGN Equity IX

    Any suggestions?

    You made my day!

    Ciao

  11. #11
    Valued Forum Contributor
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2003
    Posts
    2,488

    Re: transpose different sets of data in rows to columns

    see attachment, run macro "TR", I have added another column for this middle part
    Attached Files Attached Files

+ 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.2.0