Hi All,
With the solution mentioned below, I am able to execute the macro correctly in any other workbook. However the problem that I run into is that the output is not correct. But when I execute the macro on any worksheet in the same file, the output works fine correctly. I do not know what is so special about the workbook that contains the macro which lets it handle everything correctly. I had basically taken a uniqueitem lookup function developed by one of the members of the forum and used it and that does not seem to function correctly in the new workbook. Any ideas as to what could be the problem.
The attachment description is following:
1) 5x7.xls: contains the macros which work fine for any worksheet in this workbook.
2) template_results.xls: Contains the file on which I am trying to run the macro from 5x7.xls workbook and the output csv file is not correct since the uniqueitem lookup function did not work correctly.
When I try to copy the contents of template_results.xls in 5x7.xls and run the macro from 5x7.xls file, I can get the correct output csv files in the format that I want. However when I execute the macro in template_results.xls file, the output csv file does not get created correctly.
Any help would be greatly appreciated.
Thanks,
Anshul
Bookmarks