Get Data from Excel, based on a 2nd Excel sheet

I searched but couldn’t find an answer to this.

I have 2 files A & B

File A has a large number of people’s contact information.

File B has aprox. 25% of the people in file A with no address info but different data.

In column A of both files is a unique ID number.

I need to search File A for only the people in File B & add the row of data to the end of the same row (column G) in File B.

Or if thats not possible just create a 3rd file that matches File A but only has the people in File B.

Hope that makes sense… Thanks!!!

Model: iMac
AppleScript: 2.2.1 (100.1)
Browser: Safari 528.16
Operating System: Mac OS X (10.5)

If the goal is to get addresses from WorkbookA and put them in the right cells of WorkboookB, a script isn’t nessesary. Native Excel will do that.

Put this in WorkbookB Sheet1 G1

=VLOOKUP(A1, [WorkbookA.xls]Sheet1!$A$1:$G$1000, 7, FALSE)

Drag it down. Copy the column and Paste Special Values.