VLOOKUP checks in validation rules
Key Takeaway
A VLOOKUP check blocks a save when a value stored in a custom object doesn't match what the user entered. The lookup must match on that object's Record Name field.
VLOOKUP is a formula function that lets a validation rule check a value against a reference table stored in a custom object, much like the VLOOKUP() function in Excel. A common use is making sure the ZIP code on a record matches the state the user entered. The rule looks up the ZIP code in a custom object that holds a record for every valid ZIP code.
How a VLOOKUP check works
A validation rule runs a formula before a record is saved. When the formula returns True, the rule blocks the save and the user sees an error message.
A VLOOKUP check follows the same pattern: the formula pulls a value from a record in the reference table and returns True when that value doesn't match what the user entered.
VLOOKUP is only available in validation rules, so a formula field can't use it.