Documents/Files overview:
Master spreadsheet containing 3000+ tasks for various projects
Sharepoint list of 40 different project numbers that are important to my team
Refined spreadsheet containing only tasks assigned to the relevant project numbers
Current Operations:
1. Wipe the Refined spreadsheet
2. Get the most recent project number list from the SharePoint
3. List all of the rows in the Master spreadsheet (unable to perform OData filtering using the values from the sharepoint list apparently)
4. On a row by row basis (apply to each) compare that row's Project number to the SharePoint list by looping through an if statement.
5. If the current row's project number = a project number in the SharePoint list then add the current rows values as a new row to the refined sheet
Problem:
After 20 minutes it's on row 60/3637 and is obviously far too slow to be practical. How can I refine/replace this process to speed it up?
Edit:
My best guess is that every time it adds a row it opens, updates, saves and closes the spreadsheet (as evidenced by the fact that I can open the spreadsheet and see that it has been updated throughout the process). A solution would be finding a way to store the rows and add them later all at once.