+ Reply to Thread
Results 1 to 7 of 7

Need help transposing Rows into 3 equal columns

  1. #1
    Registered User
    Join Date
    10-06-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Need help transposing Rows into 3 equal columns

    Hello everyone. I am new to this site and I have been reviewing some great post from the members and admins here. I hope you're able to help me with my problem.

    I have created a batch file that automatically creates a directory listing of any folder that I choose. I have made it so that it saves the listing as a csv and opens the file in excel.

    I am getting stuck because I need to be able to break that list down into 3 equal columns.

    Ex:

    a
    b
    c
    d
    e
    f

    into: a b c
    d e f

    I have tried to transpose but it spreads the list completely over the total amount of columns. Is there anyway to limit the range to 3 columns?

    Thank you again for your help!
    Last edited by Onenguyen; 10-06-2010 at 01:48 PM.

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Need help transposing Rows into 3 equal columns

    Hi, Try this:-
    Please Login or Register  to view this content.
    Regards Mick

  3. #3
    Registered User
    Join Date
    10-06-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Need help transposing Rows into 3 equal columns

    Quote Originally Posted by MickG View Post
    Hi, Try this:-
    Please Login or Register  to view this content.
    Regards Mick

    Micky! You're amazing. Is there anyway to make it so the first column gets deleted and the transposed columns shift left? Thank you so much!

  4. #4
    Registered User
    Join Date
    10-06-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Need help transposing Rows into 3 equal columns

    I also have a question that most of you will think is pretty dumb, but when I create the macro and insert the script it only saves it in the current worksheet. Is there anyway to save it so I can use this macro for future worksheets that I create in the future?

    I know when you use the "Record New Macro" it gives you an option to save to your Personal folder, but it doesn't give me that option when creating one via VBA.

    Thanks again!

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Need help transposing Rows into 3 equal columns

    Hi, If deleting Column "A" will do, then add this line as below/
    Please Login or Register  to view this content.
    Ps:- If you save your code in an Odinary Module (Not sheet) then you can call it from any sheet , in case below using a CommadButton in any sheet.
    Please Login or Register  to view this content.
    Mick
    Last edited by MickG; 10-06-2010 at 10:27 AM.

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Need help transposing Rows into 3 equal columns

    For what its worth
    Here is a formula based method

    In C1 put the number of rows you need to transpose
    D1
    Please Login or Register  to view this content.
    Drag across until Value =0


    In C2
    Please Login or Register  to view this content.
    Drag/Fill Down and Across

    Change the value in C1 to see the results
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  7. #7
    Registered User
    Join Date
    10-06-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Need help transposing Rows into 3 equal columns

    Sorry I think I meant to say that I want to use this macro for any further workbooks. I am constantly creating new workbooks for different jobs, but the output always needs to be in the same format (I'm given a list and need it to be formatted into 3 columns). With word I am able to save the macro and pull it up for whatever document I need. I hope there's a way to do that with excel.

    Thanks again. Your code worked perfectly!

+ 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