+ Reply to Thread
Results 1 to 2 of 2

transposing data read in from separate CSV files

  1. #1
    Registered User
    Join Date
    09-22-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    38

    transposing data read in from separate CSV files

    VBA newbie here, please forgive if my structure and code is poor. Feel free to make suggestions or send me links to improve my learning/conventions and coding style.
    Background: I’ve been piecing together several modules to perform certain web scraping tasks and eventually assembling the data collected into a table format in order to do further analysis. The attached excel doc has a couple of modules in it, which I left in case it helps with background info for how I get the data - perhaps there is something more efficient I’m unaware of. My challenge is in the Module “READ_CSV_Files”. Working off this blog post (https://sites.google.com/a/madrocket...svs-to-1-sheet ) I’ve modified the code a bit and desire to modify it even more.

    As of now I can read in the data from separate csv’s downloaded from my retrieval modules and have the associated filename (in this case the file name is also the ticker symbol) linked to the records assembled by adding a column with this entry (“MasterCSV” tab). What I want to do is have the data transposed and add additional columns with parameter data of the web scrape associated with each record. See the tab with desired output. The parameters I want recorded are in various places in the input tab, I’ve assigned most of the variables with Range designations, but I’m challenged with how to associate description and sector from the input tab. I can always do this with a vlookup in a later/separate step, but it would be nice to build it into the module.

    I tried a ‘record macro’ and sort of identified the “Transpose:=True” line and I believe I have to rearrange the order of the ‘read in’ steps. Such that the data is transposed before assigning the filename(ticker) However, as I’ve played around with variations in the code it I can’t seem to get it to work the way I envision.
    Attached Files Attached Files
    Last edited by JBeaucaire; 12-26-2019 at 03:33 PM.

  2. #2
    Registered User
    Join Date
    09-22-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: transposing data read in from separate CSV files

    I realize I put too many issues into this post, but breaking down the components I think I've come up with a reasonable plan to transpose what I need, but I'm have some syntax/methodology struggles. I've introduced a new sub to perform the transpose. The two primary issues are:

    1) finding the last row to create a stopping point for my do while loop
    2) compile error with the way I'm referencing my ranges

    Please Login or Register  to view this content.
    Thanks in advance for any assistance in progressing my vba knowledge

+ 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. Replies: 1
    Last Post: 07-10-2016, 02:27 PM
  2. [SOLVED] How to read text data from .dat files and fetch the data in to excel based on input..
    By mahendra.asapu in forum Excel Programming / VBA / Macros
    Replies: 62
    Last Post: 07-19-2015, 04:36 AM
  3. Read data from multiple files
    By GKT in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2015, 08:03 AM
  4. merge or read data from multiple files
    By nps2 in forum Excel General
    Replies: 0
    Last Post: 11-20-2014, 04:31 PM
  5. macro to access and read data from HDF files
    By bored in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2013, 10:14 PM
  6. Read data and separate into different worksheets
    By alien3011 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-17-2008, 08:50 PM
  7. Extracting data from read only EXCEL files
    By Barb Reinhardt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-22-2006, 11:25 AM

Tags for this Thread

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