Two tables are given in the beginning of formula .
If function gives 1 or 2 depending on condition. 1 selects first table similarly for 2 selects second table.