Hi, i have a work task which is very manual, i was hoping it could be automated.
I need a macro that will look at Col C in sheet "Raw" and look for single string codes before the first "-" if code found then create a tab for that code and import all data for that code to its own worksheet. If no code found then create a worksheet named "INVESTIGATION" and dump all unidentified items to that worksheet.
Note the single code will always be in Upper case, so its easy for the code to scan. Also once the data has imported to its own worksheet, i need the code to insert a row between each unique Comment, but not for sheet "INVESTIGATION". Please see below example.
This is a monthly task, so if new codes are found then the macro needs to create new worksheet for that code.
I need a macro that will look at Col C in sheet "Raw" and look for single string codes before the first "-" if code found then create a tab for that code and import all data for that code to its own worksheet. If no code found then create a worksheet named "INVESTIGATION" and dump all unidentified items to that worksheet.
Note the single code will always be in Upper case, so its easy for the code to scan. Also once the data has imported to its own worksheet, i need the code to insert a row between each unique Comment, but not for sheet "INVESTIGATION". Please see below example.
This is a monthly task, so if new codes are found then the macro needs to create new worksheet for that code.
Excel Workbook | |||||
---|---|---|---|---|---|
A | B | C | |||
5 | Message | Feed | Description | ||
6 | Deleted | 1ANXXEAUDREP | 150311 Joe Bloggs - there is a separate holdings in these bank accounts | ||
7 | Deleted | 1GCSXSAUDREP | 150311 Joe Bloggs - there is a separate holdings in these bank accounts | ||
8 | Deleted | 1GSXXSAUDREP | 150311 Joe Bloggs - there is a separate holdings in these bank accounts | ||
9 | Deleted | 1OGSXOAUDREP | 150311 Joe Bloggs - there is a separate holdings in these bank accounts | ||
10 | Deleted | WSTBFAAUDREP | 150311 Joe Bloggs - there is a separate holdings in these bank accounts | ||
11 | Deleted | WTINCAAUDREP | 150311 Joe Bloggs - there is a separate holdings in these bank accounts | ||
12 | Deleted | WTINCADISTAMPB | DMP1-Email Me | ||
13 | Deleted | WCTFUNFEAEXP | DMP1-Email You | ||
14 | Deleted | WCTFUNPEAEXP | DMP1-Email You | ||
15 | Deleted | WCTFUNPECEXP | DMP1-Email You | ||
16 | Deleted | WCTFUNPEZEXP | DMP1-Email You | ||
17 | Deleted | WEMFUNFE3EXP | CITI-Email Me | ||
18 | Deleted | WEMFUNFEAEXP | CITI-Email You | ||
19 | Deleted | WEMFUNFEBEXP | CITI-Email You | ||
Raw |
Excel Workbook | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | Message | Feed | Description | ||
2 | Deleted | WTINCADISTAMPB | DMP1-Email Me | ||
3 | |||||
4 | Deleted | WCTFUNFEAEXP | DMP1-Email You | ||
5 | Deleted | WCTFUNPEAEXP | DMP1-Email You | ||
6 | Deleted | WCTFUNPECEXP | DMP1-Email You | ||
7 | Deleted | WCTFUNPEZEXP | DMP1-Email You | ||
DMP1 |
Excel Workbook | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | Message | Feed | Description | ||
2 | Deleted | WEMFUNFE3EXP | CITI-Email Me | ||
3 | |||||
4 | Deleted | WEMFUNFEAEXP | CITI-Email You | ||
5 | Deleted | WEMFUNFEBEXP | CITI-Email You | ||
6 | |||||
CITI |
Excel Workbook | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | Message | Feed | Description | ||
2 | Deleted | 1ANXXEAUDREP | 150311 Joe Bloggs - there is a separate holdings in these bank accounts | ||
3 | Deleted | 1GCSXSAUDREP | 150311 Joe Bloggs - there is a separate holdings in these bank accounts | ||
4 | Deleted | 1GSXXSAUDREP | 150311 Joe Bloggs - there is a separate holdings in these bank accounts | ||
5 | Deleted | 1OGSXOAUDREP | 150311 Joe Bloggs - there is a separate holdings in these bank accounts | ||
6 | Deleted | WSTBFAAUDREP | 150311 Joe Bloggs - there is a separate holdings in these bank accounts | ||
7 | Deleted | WTINCAAUDREP | 150311 Joe Bloggs - there is a separate holdings in these bank accounts | ||
INVESTIGATION |