Thanks RW for looking into the issue. I have not that much idea regarding the macro. In my attached program, three datasets are there (country, xxx and cre_time) out of which I want to print the excel file based on distinct name from dataset country. (e.g. if name =india, US, then two excel output will be generated ). Once the excel file is generated, I want to create another sheet (on the existing) name as "Data2". To the sheet (Data2), data will be added from another dataset (xxx) if the name are matching. e.g. For datasets xxx and country, the common matching variable is 'name'. So data from dataset (xxx) will be added to sheet (Data2). I attach output for your reference. Output should be like below (as distinct name would be india, us and uk, so three excel spreadsheet will be created in C drive) UK_23JAN2014_25MAR2014.xlsx US_23JAN2014_25MAR2014.xlsx India_23JAN2014_25MAR2014.xlsx
... View more