+ Reply to Thread
Results 1 to 6 of 6

Importing multiple CSV files and transposing contents into successive rows

  1. #1
    Registered User
    Join Date
    07-23-2013
    Location
    Vancouver
    MS-Off Ver
    Excel 2010
    Posts
    2

    Importing multiple CSV files and transposing contents into successive rows

    Hi, new to the forums and pretty much joined to get help with this.

    I have ~500 dpt files that I need to import into excel and organize from columns into rows.
    Previously I have used the text importer and then copy and pasted the data using the transpose function into rows, organizing it as I go, but this was done with at most 20 files and takes some time to do (also is very tedious).

    The data is arranged in two columns of 2307 rows which I need in 2 rows of 2307 columns.
    All the files are in the same location and have numerical designations
    The example excel file shows the format I am going for (it has 5 data entries while I could only provide 4 txt files)
    Also, the txt files native format is .dpt which I had to change to .txt to upload.

    I tried using the record function to generate a macro as I have no Visual Basic experience and all I was able to do was get Excel to transpose the data automatically (had to manually import the data) but it would overwrite the previously imported data with each new data import.

    Any help would be appreciated! I'm not even sure if something like this is possible...


    Edit: Thanks moderator for pointing out issue with title!
    Last edited by Strupo; 07-23-2013 at 04:15 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Need help with writing a Macro

    Strupo,

    Welcome to the forum!
    [EDIT]: Thank you for changing your title
    Last edited by tigeravatar; 07-23-2013 at 01:48 PM. Reason: OP changed title
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Importing multiple CSV files and transposing contents into successive rows

    With that business out of the way, can you provide a couple sample csv files as well as an Excel file that would show the desired results?
    To attach a file, click the "Go Advanced" button and then click the paperclip icon to open the Manage Attachments dialog.

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Importing multiple CSV files and transposing contents into successive rows

    Strupo,

    This code accomplishes the goal successfully using the sample files:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-23-2013
    Location
    Vancouver
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Importing multiple CSV files and transposing contents into successive rows

    thanks so much!

    you are my hero of the day

  6. #6
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Importing multiple CSV files and transposing contents into successive rows

    You're very welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro Writing
    By Blake 7 in forum The Water Cooler
    Replies: 13
    Last Post: 03-05-2011, 04:15 PM
  2. Writing a macro (copy&paste macro)
    By skatmandu2002 in forum Excel General
    Replies: 3
    Last Post: 02-23-2010, 06:26 PM
  3. [SOLVED] New to Macro writing
    By Going in Circles in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2006, 12:30 AM
  4. Macro Writing
    By MSHO in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-11-2006, 05:45 PM
  5. Help writing a macro
    By Parry in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2005, 03:08 AM

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