• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to open each file in a folder and copy Data and rows to a report if conditions are met.

stevetodd400243

New Member
Hello, I am searching for a macro that will accomplish the following.
I have several files in a folder on my desktop like the 2 examples Ever Eagle, and OOCL. Each file will be identical. and will have a different number of rows up to row 39. The other workbook “CFS On Hand” I need to be a report file. I want to place this file in the folder with the files and when a user selects it a message box come up asking if they want to create a new report. Selecting “YES” will activate the macro to open each file in the folder and look for a date in cell “H4” in each file. If no date in that cell, skip that file. If a date is in that cell, look for any cells that are blank in any row that has Data in G13 thru J39. And copy that Row, up to Column “P”, over to the Report File. Each file can have a different number of Rows with Data up to Row 39. In the 2 Example File it would skip the OOCL file as no Date in in Cell H4. But it would copy over row 15 in the Ever Eagle file as it has open cells in the rows with data, and has a Devan date in cell H4. Needed Results As shown in the example. After opening each file and running the macro it would save the report in the file as CFS ON HAND REPORT – and the current date. Thanks for all the help, i appreciate your time.
 

Attachments

  • CFS ON HAND Report_test.xlsm
    12.5 KB · Views: 4
  • OOCL SAN FRANCISCO 1930.xlsx
    23.7 KB · Views: 1
  • EVER EAGLE 9240.xlsx
    23.5 KB · Views: 1
Back
Top