Excel Return another cell value if a match is found in an array of list
<p>How do you get the value for a Price Row in an excel having three rows below with a condition if a Name exist in list of all Names return the price as a result. So in case of X and Y since it exist in list of array for all names I want to get 5 and 6 for the result</p>

<pre><code> Name   All List of Names   Price 
 X         T                1
 Y         R                2
 Z         E                3
 A         Q                4
 B         X                5
 C         Y                6
</code></pre>