title: If a value is present in a column and, for the same row, another column matches a certain value, then return a third value
body: <p>I have an excel worksheet looking like this:</p>
  
  <p><code>ISO-Code; Main Sample
   IT             x
   DE             x
   GB<br>
   US             x
   DK<br>
   ES             x</code></p>
  
  <p>On another working sheet I also have the ISO country codes and I would need a column looking like this:</p>
  
  <p><code>ISO-Code; Main Sample
   IT             YES
   DE             YES
   GB             NO<br>
   US             YES
   DK             NO 
   ES             YES</code></p>
  
  <p>Basically, if the country code in the second table can be retrieved in the first one and if the column "Main Sample" has an "x" for that country code, then we will have "YES" in the second column of the second table, otherwise, "NO".</p>
  
  <p>I can not quite understand how to combine IF and VLOOKUP/MATCH function to have the output that I need.</p>
  
  <p>Thank you!</p>