Make vlookup between excel workbooks without leaving empty cells

Hello everyone, I am doing a lookup between two excel books, which values are found works perfectly, but when the value is not found, the cell is left blank, there is some way that if the value is not found, leave the origin value?
image
image

image

In this case, do not leave the cell empty but leave the number 98740382

  1. That won’t work if the table is not sorted.
  2. If Vlookup returns the key in column 1 then return the value from column 2, else return the key value
    =IF(VLOOKUP(A1,$A$8:$B$10,1)=A1,VLOOKUP(A1,$A$8:$B$10,2),a1)

Key
8192
2048
5000
4096

C1 C2
2048 1
4096 2
8192 3

ID
3
1
5000
2

Thank you very much @thomas.graham , but I don’t quite understand how to incorporate this into my code, do I use an assing? The 1 and 2 that end in the sentences are the data tables? I would appreciate if you could explain