Manish_Gupta
New Member
- Joined
- Sep 18, 2013
- Messages
- 8
Dear Experts,
I am looking for a Macro which filter the data basis the unique date (month wise) mentioned in one column and copy and paste the filtered data of selected columns to different sheets in same workbook, consolidate and save it as Notepad.
For Example: Below is the data available in Main Sheet
Steps:
1. Macro need to filter the data basis the unique Date mentioned in Column E.
2. Then copy the all filtered rows (without headers) of Column A and Column C into Sheet1 at Column C and Column D.
3. Then copy the all filtered rows (without headers) of Column A and Column D into Sheet2 at Column C and Column D.
4. Then copy the all filtered rows (without headers) of Column A and Column B into Sheet3 at Column C and Column D.
5. Also, Macro insert the fix values against all the rows in Sheet1 Column A as 01 and Column B as "CBS", in Sheet2 Column A as 02 and Column B as "DBS" and in Sheet3 Column A as 03 and Column B as "EBS"
6. Now the last step is, in Sheet4 Macro consolidate the all Columns data (Column A to Column D) from all 3 sheets (Sheet1, Sheet2 & Sheet3) without headers.
7. In Sheet4, sort the data basis Column A (code mentioned as 01, 02, 03) and Column C (Roll No.) values.
8. Save the Sheet4 data as .txt file through Notepad using Date as file name.
9. Clean all the data from Sheet1, Sheet2, Sheet3 and Sheet4 (do not clean the headers).
10. Perform all 1 to 9 steps again for the next unique date available in Main sheet automatically.
Please note, the number of rows in Main sheet is huge but unique date values are of 2 years.
Apologies for not providing any sample data.
Thanks for your help,
I am looking for a Macro which filter the data basis the unique date (month wise) mentioned in one column and copy and paste the filtered data of selected columns to different sheets in same workbook, consolidate and save it as Notepad.
For Example: Below is the data available in Main Sheet
Roll No. | Address | Mobile | Date | |
101 | abc@gmail.com* | 123, Delhi | 111111111 | 31012022 |
102 | abc@gmail.com* | 345, Gurgaon | 123456789 | 31012022 |
103 | xyz@yahoo.com | - | - | 28022022 |
104 | - | - | 123456789 | 28022022 |
101 | abc@gmail.com | 123, Delhi | 111111111 | 31032022 |
Steps:
1. Macro need to filter the data basis the unique Date mentioned in Column E.
2. Then copy the all filtered rows (without headers) of Column A and Column C into Sheet1 at Column C and Column D.
3. Then copy the all filtered rows (without headers) of Column A and Column D into Sheet2 at Column C and Column D.
4. Then copy the all filtered rows (without headers) of Column A and Column B into Sheet3 at Column C and Column D.
5. Also, Macro insert the fix values against all the rows in Sheet1 Column A as 01 and Column B as "CBS", in Sheet2 Column A as 02 and Column B as "DBS" and in Sheet3 Column A as 03 and Column B as "EBS"
6. Now the last step is, in Sheet4 Macro consolidate the all Columns data (Column A to Column D) from all 3 sheets (Sheet1, Sheet2 & Sheet3) without headers.
7. In Sheet4, sort the data basis Column A (code mentioned as 01, 02, 03) and Column C (Roll No.) values.
8. Save the Sheet4 data as .txt file through Notepad using Date as file name.
9. Clean all the data from Sheet1, Sheet2, Sheet3 and Sheet4 (do not clean the headers).
10. Perform all 1 to 9 steps again for the next unique date available in Main sheet automatically.
Please note, the number of rows in Main sheet is huge but unique date values are of 2 years.
Apologies for not providing any sample data.
Thanks for your help,