Hi. I have multiple files with a key field each.
- The key field can be located in any column - the column is not known in advance.
- All key fields per file are listed in a consolidated file from the left to the right in a table such as File 1, File 2 File 3, File 4, File 5, File 6. CHECK fields are comparing if the values in 2 fields to the left match. The number of files - 6 is an example. It can be larger (up to 50).
- Hyperlink to each file is provided in the consolidated file.
- I have to count how many lines are in the File1, File2, File3, File4, File5, File6 in the certain field (field name is provided in line 4 for each file in the Consolidated file) match Criteria ID. This could be ID1, ID2, IDs. Criteria for each file is also provided (criteria ID is provided in line 5 for each file in the Consolidated file).
I have to loop through all the files to count number of IDs in a given field meeting given criteria and populate COUNTIF values to the fields File1, File2, File3, File4, File5, File6 in the consolidated file. This should be done with VBA instead of current formulas provided in File1, File2, File3, File4, File5, File6 fields.
Please see consolidated file and sample files File1, File2, File3, File4, File5, File6 attached. The file should be unzipped to C:\ directory to enable hyperlinks.
Thank you.
Bookmarks