hi Nicholas, welcome to the forum. sounds like VLOOKUP can help you. do upload a sample Excel file for us to help you better. to upload, press "Go Advanced" beside the "Post Quick Reply" button & click on the paperclip icon

assuming your large database is in A1:G25000 of Sheet1, and the unique 6 digit in the other worksheet is in cell A1, it looks something like:
=VLOOKUP(A1,Sheet1!$A$1:$G$25000,2,0)

this is to look for the unique number in column A & return the 2nd column. just an eg