title: Google Spreadsheet - Compare multiple pairs of columns to validate data
body: <p>I have a Google sheet that has two sets of six columns each.
  Each set is imported with the <code>importrange</code> function from two different spreadsheets that are fed by their own Google webforms.
  What I've trying to do without success is to compare at once multiple "pairs" of columns for matching cell contents.
  Here goes the example with working data:</p>
  
  <p><strong>Paid on behalf of customers</strong></p>
  
  <pre><code>Address              Person            Service      Invoice#   $$    Payment date
  50 Rodeo Drive       Elton John        Water        10        100   9/07/2013
  678 California St    Robert DeNiro     Electricity  15        120   10/07/2013
  345 Dalton Rd        Sylvester Stall1  Cable TV     23        45    11/07/2013
  9876 Knoxville St    Al Pacino         Water        42        98    12/07/2013
  </code></pre>
  
  <p><strong>Recovered from customers</strong></p>
  
  <pre><code>Address             Person             Service      Invoice #   $$     Payment date
  50 Rodeo Drive      Elton John         Water        10          100    9/07/2013
  678 California St   Robert De Niro     Electricity  15          120    10/07/2013
  </code></pre>
  
  <p>My question is <strong>How to compare each pair of columns</strong> altogether (i.e. column "Address" in the first dataset with the column "Address" in the second dataset, and so forth. The aim is to get a third dataset with "only" the recovered invoices, displaying the related data as well (person name, service paid and recovered, invoice #, amount payed and payment date. Is there a <em>formula/function/google apps script</em> or a combination of them to perform this task?
  I tested with <code>=ArrayFormula(if(len(D3:D);if(isnumber(match(D3:D;K3:K;0));"Recovered";"Pending");iferror(1/0)))</code> 
  but I can only check if there's a match between two columns and show a flag. I mean, I want to check if there are multiple matches before showing a result.</p>
  
  <p>Thanks in advance!</p>