=LOOKUP(2,1/(B1:B20="CPF1164"),C1:C20)
same resultYou don't really need VBA for that. You can use the formula described in this method here: Formulas to Vlookup Values from Bottom to Top in Excel 365!!
So the formula might look something like this:
Excel Formula:=LOOKUP(2,1/(B1:B20="CPF1164"),C1:C20)