I tried to look for previous answers but none of the scripts I found can suit my needs.
I have two Google spreadsheets:
The source file file2 has 8 columns. The first column is offernumber:

The other spreadsheet, file1, has a corresponding ordernumber column.

Where there is a match on ordernumber to offernumber, I need an automatic way to copy the data in file 2 into the corresponding row in file 1.
I managed to copy values manually when I enter a query into the spreadsheet, such as:
=QUERY( ImportRange( "keyspreadsheet" ;"Sheet1!A2:H1000"),
"select Col2,Col3,Col4,Col5,Col6,Col7,Col8 where Col1='6/2012' ";0)
But am not able to figure out how to script this. Any help would be appreciated!
