+ Reply to Thread
Results 1 to 14 of 14

How to modify the macro wich summarize all the files from the particular folder?

  1. #1
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    How to modify the macro wich summarize all the files from the particular folder?

    Hi!

    I've got a macro wich I use for consolidating everyday reports into one - it works great, but I'd like to modify it a bit.

    The criteria I'd like to add:

    1) I don't need all the content of each seperate file,-
    The content must be evaluated by column V5,
    consequently if value of column V5>0 then the row must be included in the summary;

    2) One more additional column in the summary is needed, which must be filled with the name of each particular file.

    The code I've been using till now:
    Please Login or Register  to view this content.
    The files for consolidation attached:Summary-Macros.zip

    The expected resul would be: Expected-result.xls

    Thanks in advance!
    Regards

    Arty

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to modify the macro wich summarize all the files from the particular folder?

    Hi Arty,

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: How to modify the macro wich summarize all the files from the particular folder?

    Hi, xladept! Thanks for yor help!

    I was trying to consolidate 5 files, 22000 rows each, consequently 590 rows should be shown as a result in the summary file, but it's just 90 rows,

    furthermore the values aren't filtred by the determined criteria ">0"

    I did change the column name in the code.

    P.S.
    The number of the column: 5th (the same as in attached files)

    Any thoughts?

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to modify the macro wich summarize all the files from the particular folder?

    Make the red code into whatever the new column name is:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: How to modify the macro wich summarize all the files from the particular folder?

    I wrote before, that I changed the column name in the code.

    Not working - could the size of the large files I try to consolidate be the reason of the issue?

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to modify the macro wich summarize all the files from the particular folder?

    The size shouldn't matter - can you post new samples and/or your new code??

  7. #7
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: How to modify the macro wich summarize all the files from the particular folder?

    Here are the other bigger files: 14-02-2015.zip15-02-2015.zip16-02-2015.zip

  8. #8
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: How to modify the macro wich summarize all the files from the particular folder?

    This is the code I used:

    Please Login or Register  to view this content.

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to modify the macro wich summarize all the files from the particular folder?

    Hi Arty,

    Try this:

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: How to modify the macro wich summarize all the files from the particular folder?

    Hi xladept!

    Now it's better but anyway I'm facing an issue:

    I tried to consolidate 4 files, as a result only 589 rows were included in the summary file. In fact 591 rows must be there.

    I've sorted the data of every seperate file by column REZERVAS in descending sequence,

    it's obvious that every last row of column REZERVAS at value > 0

    isn't included in the summary file.

    It can be checked by the column A:
    The codes which aren't included:
    CODE145
    CODE305
    CODE468

    I've attached the files and the summary with the code I've used.


    Attachment 377820Attachment 377821Attachment 377823Attachment 377824Attachment 377825

  11. #11
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to modify the macro wich summarize all the files from the particular folder?

    Hi Arty,

    You say you're missing two rows but three codes? I couldn't access your attachments so I can't look yet - I'll go over the files from yesterday and examine my code??

    BTW - You realize that I'm only writing the first header don't you?
    Last edited by xladept; 02-17-2015 at 03:07 PM.

  12. #12
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to modify the macro wich summarize all the files from the particular folder?

    I found my mistake

    Please Login or Register  to view this content.
    Last edited by xladept; 02-17-2015 at 03:35 PM.

  13. #13
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: How to modify the macro wich summarize all the files from the particular folder?

    Finally we've got it!

    It's brilliant!

    It'll save LOTS of time and nerves!

    Thanks a lot xladept!

  14. #14
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to modify the macro wich summarize all the files from the particular folder?

    You're welcome and thanks for the rep!

    (It was a stupid mistake - aren't they all)

+ 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 to create a folder and then save all files in that folder
    By gokzee in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-27-2013, 01:49 PM
  2. Replies: 1
    Last Post: 03-12-2013, 04:45 AM
  3. Macro to Summarize daily files by copying blocks from daily files.
    By menoninblack in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-26-2012, 07:26 AM
  4. Modify Macro To Save In To Another Folder
    By JimmiOO in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-12-2010, 01:38 PM
  5. modify ALL files in a folder
    By TedH in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-13-2009, 04:53 PM

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