+ Reply to Thread
Results 1 to 9 of 9

Shift/transpose values (Macro needed)

  1. #1
    Registered User
    Join Date
    04-07-2011
    Location
    Gent, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    38

    Question Shift/transpose values (Macro needed)

    Hi everyone,

    I'd like to shift/transpose data from one sheet and produce something in another sheet so I can make a csv to import it in a database.

    What I'd like to achieve is this: (don't look at the dashes, those are just so I can format it a bit to make it look like a table)

    Clientcode--------Name--------Language----------Country
    123-------------------Alex-----------English------------England
    456-------------------Bart-----------French-------------France
    999-------------------Charlie-------Greek--------------Greece

    and let a macro produce this:

    Name----------Alex---------123
    Language-----English-----123
    Country--------England----123
    Name-----------Bart----------456
    Language------French------456
    Country---------England----456
    Name------------Charlie-----999
    Language------Greek-------999
    Country---------Greece-----999


    EDIT:
    I added a better example in the excel file.
    (I didn't know that spaces would be trimmed in the post)


    Does anyone know how to achieve this?

    Thank you very much.

    Regards,

    Gosa
    Attached Files Attached Files
    Last edited by pike; 11-14-2011 at 04:59 AM. Reason: I added a better example in the excel file.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Shift/transpose values (Macro needed)

    hi, gosa, check attachment, run code "test"
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Shift/transpose values (Macro needed)

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-07-2011
    Location
    Gent, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Shift/transpose values (Macro needed)

    Quote Originally Posted by watersev View Post
    hi, gosa, check attachment, run code "test"
    Hi,

    I'm in shock
    I can't believe you made something so fast.
    Wow.
    I'm so excited.

    I went and took a look how you did it but I will have to check this tomorow cause it looks like chinese to me right now and it's way to late for my head to function correctly.

    I will let you know if I was able to use it with the REAL sheet cause it's a bit different.

    Thank you so much by the way!!!!!!!!!!!

    Cheers

  5. #5
    Registered User
    Join Date
    04-07-2011
    Location
    Gent, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Shift/transpose values (Macro needed)

    Quote Originally Posted by nimrod View Post
    Please Login or Register  to view this content.
    Hi Nimrod,

    Thanks for your post. I will try it out tomorow too.
    And try and figure out how you structured your code so I can learn from it.
    Thanks again.

    Cheers

  6. #6
    Registered User
    Join Date
    04-07-2011
    Location
    Gent, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    38

    Thumbs up Re: Shift/transpose values (Macro needed)

    Hi Guys,

    I just want to thank you again for your help so many thanks for both of you!

    Cheers,

    Gosa

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Shift/transpose values (Macro needed)

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  8. #8
    Registered User
    Join Date
    04-07-2011
    Location
    Gent, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Shift/transpose values (Macro needed)

    Hi Pike,

    I can see a edit button in the last thread that I posted but not in the previous ones and also not in the first one. I'm not sure if it's me who is doing something wrong or if I don't have enough privileges to change the first post.

    Edit: When I posted this message I can see two EDIT buttons. obviously this message cause I just changed it and the previous one.

    Thanks.

  9. #9
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Shift/transpose values (Macro needed)

    Thats strange you should be able to do ti anyway its Done

+ 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