JackDanIce
Well-known Member
- Joined
- Feb 3, 2010
- Messages
- 9,922
- Office Version
- 365
- Platform
- Windows
Hi,
I have data in > 2,500 CSV files to aggregate, clean and reduce to 2 columns.
Each file contains at mininum an address and restricted key word e.g. 1 Abbey Road, License Submitted (key word in bold)
Some files have more than 1 address and key word, e.g. 1 Abbey Road, License Submitted, 2 Abbey Road, London, License Approved
Comma's are used as delimiting character (unfortunately means some addresses span 1 cell, others more than 1 cell); key words pre-exist and can be placed into a dictionary.
Task is to create a 2 column list where column A is the address and column B is the key word
Using a nested loop seems inefficient, to test each cell value if it exists in the dictionary and process accordingly; key words needed for final stats (probably pivot the data once 2 column list is created).
Any suggestions or code design for this?
TIA,
Jack
I have data in > 2,500 CSV files to aggregate, clean and reduce to 2 columns.
Each file contains at mininum an address and restricted key word e.g. 1 Abbey Road, License Submitted (key word in bold)
Some files have more than 1 address and key word, e.g. 1 Abbey Road, License Submitted, 2 Abbey Road, London, License Approved
Comma's are used as delimiting character (unfortunately means some addresses span 1 cell, others more than 1 cell); key words pre-exist and can be placed into a dictionary.
Task is to create a 2 column list where column A is the address and column B is the key word
Using a nested loop seems inefficient, to test each cell value if it exists in the dictionary and process accordingly; key words needed for final stats (probably pivot the data once 2 column list is created).
Any suggestions or code design for this?
TIA,
Jack