I would like to use Google Apps Script to populate a spreadsheet with filtered data from another spreadsheet.

The source document is a list of employees (column A, NAME), with their reported hours (column B, HOURS), the project they are working on (column C, PROJECT), and their specific task (column D, TASK).

I would like to populate the second spreadsheet with the same information, but only where the PROJECT equals "Project X" and the Task equals either "Task 1" or "Task 2."

I know how to do this without scripts in the source document, but Google spreadsheets does not allow VLookup, or any other lookup function that I am aware of, to lookup values across separate documents. Importing the source data to the second spreadsheet using ImportRange does not work in this case because the source data is too large (ultimately, this script will have to be altered to look at several source documents since there is too much data for one spreadsheet).

I am sorry I have no code. My attempts to solve this problem on my own have gotten me nowhere. 

Thank you!