+ Reply to Thread
Results 1 to 5 of 5

Convert rows to columns

  1. #1
    Registered User
    Join Date
    05-14-2013
    Location
    Nyköping, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    3

    Convert rows to columns

    Hello,

    I need to convert a .skv file containing three rows into one row with several columns.

    The file looks like this:
    D1000;286;AR;2
    ;0; 1
    END

    And I want it to look like this instead:

    D1000 286 AR 2 0 1 END

    Can somebody please help me with the the code for this operation?

    Regards
    Olov
    Last edited by Ledarn; 05-29-2013 at 03:55 AM. Reason: Solved!

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Convert rows to columns

    try this code, if problems attach please the file
    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    05-14-2013
    Location
    Nyköping, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Convert rows to columns

    It works excellent when I have one file. I didin´t mention that I have several skv-files that I would like to convert and insert into one excel sheet.

    I have a code that imports all the skv-files but I want them to be transposed like your code does.

    My current code looks like this:

    Please Login or Register  to view this content.
    So I want to have a loop that imports the skv-files, convert them into columns and then add the filename i a new column.

    Is that possible?

    //Olov

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Convert rows to columns

    Please Login or Register  to view this content.
    attach a sample file with desired result

  5. #5
    Registered User
    Join Date
    05-14-2013
    Location
    Nyköping, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Convert rows to columns

    Thank you!

    I tweaked the code a little bit and made it work!

    The code that worked the way I wanted to looks like this:
    Please Login or Register  to view this content.
    Thank you very much for you help!

    //Olov

+ 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