Hi All, I could someone assist please?

Basically I'm trying to pull data from another spreadsheet onto a master spreadsheet (again account numbers) and if the account numbers aren't there I have a new tab/ page within the master spreadsheet where I can alternatively pull them from is they it returns a value of #N/A. However, I'm OK on VLOOKUP's and thereafter my knowledge of linking in morethan 1 spreadsheet, pages get's foggy. My formular is as follows (I've changed a few things for data protection)!

=IF(ISNA(VLOOKUP(A1,MasterData\AddressData$A:$B,2,,FALSE)),"",IF(VLOOKUP(A1,MasterData\AddressData$A:$B,2,,FALSE)="","",VLOOKUP(A1,Names$A:$B,2,false)))

I know it's wrong, but don't know how to change it!