Will code always be in Col B and Qty in Col G?
If so, you can still use VLOOKUP:
=VLOOKUP(A2,Page2!B:G,6,FALSE)
Or, so long as the code is always in col B it doesn't matter where the QTY is by using:
=INDEX(Page2!$1:$65536,MATCH(Page1!$A2,Page2!$B:$B,0),MATCH(Page1!$B$1,Page2!$1:$1,0))
Bookmarks