+ Reply to Thread
Results 1 to 7 of 7

Opening multiple files (csv), applying a macro and save it in separate xls

  1. #1
    Registered User
    Join Date
    09-04-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Opening multiple files (csv), applying a macro and save it in separate xls

    Hello,
    [I put this before but it goes to pg15, and still no reply]
    I'm new in VBA, and I have tried for several days to tackle with my problem by searching in internet, but now it seems I need the professionals help ...

    There are more than 100 excel files (*.csv) in different folders. Each excel file contains:
    1. 3 columns [A-Date, B-hour (unnecessary), C-Value],
    2. 1st row is description line,
    3. and 2nd row is col. header (data should be read from 3rd row)

    Data is stored daily for several years. What I want to do is make it monthly for each year.

    Open the excel file. "Sheet1" is renamed.
    Change format of 1st col. (A-Date) to DMY.
    Calculate summation for each month. (summation of values in col.C)
    Write the results in another excel file in following format...

    Please refer to the image and sample CSV.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Opening multiple files (csv), applying a macro and save it in separate xls

    u want the output after summarizing the data right.

    one more thing each folder contain how many csv files..... and in which format u want to save the output workbook....
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Registered User
    Join Date
    09-04-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Opening multiple files (csv), applying a macro and save it in separate xls

    Right, the results need to be saved in a separate xls. file.
    The number of files in the folders are not fixed. But, name of the files are 6 digits number.
    Tq for your reply

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Opening multiple files (csv), applying a macro and save it in separate xls

    i will get back to today EOD is it ok for u....?

  5. #5
    Registered User
    Join Date
    09-04-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Opening multiple files (csv), applying a macro and save it in separate xls

    ok, no problem, i thought there is no solution man !

  6. #6
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Opening multiple files (csv), applying a macro and save it in separate xls

    Sorry for Late reply Masi,

    I almost done your query don't worry very soon u will get your solution file.

    from last 2 days i am working on your query but i am facing some problem with your attached CSV File.

    When i am copying your data and pasting in Excel files the date format getting change and i am not getting exact count.

  7. #7
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Opening multiple files (csv), applying a macro and save it in separate xls

    did you get an answer to this? As a matter of interest what is the data you are analysing?


    click on the * Add Reputation if this was useful or entertaining.

+ 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. Opening multiple files and applying a macro to all of them
    By Masi Zeyb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2013, 02:49 PM
  2. Replies: 1
    Last Post: 08-20-2013, 11:13 AM
  3. [SOLVED] VBA to save multiple worksheets as separate CSV files using name of worksheet
    By Yg74 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2012, 10:55 AM
  4. VBA to save multiple worksheets as separate CSV files using name of worksheet
    By titushanke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2012, 08:08 AM
  5. request macro to save file to multiple, separate locations
    By Joseph Spain in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-26-2005, 10:46 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