title: How to SELECT FROM WHERE in excel? Return rows from database
body: <p>I want to return rows from a table, where certain conditions are met, in excel.</p>
  
  <pre><code>ProdGroup   Width (mm)  Diameter (mm)   Date
  Prod1           1120            1000   2016-01-11
  Prod2           600             1000   2017-10-18
  Prod1           930             800    2015-04-11
  Prod3           1250            1200   2016-04-18
  Prod2           840             1000   2019-06-27
  Prod2           840              900   2018-03-21
  </code></pre>
  
  <p>I want to be make an equivalent of:  "SELECT * FROM Table WHERE ProdGroup = "Prod2" AND Diameter = 1000"
  in excel. My idea is that I enter the values into two cells and that rows are returned based on what I write in the two cells.</p>
  
  <p>I have tried using the =INDEX() function but I only managed to search for rows matching only 1 condition. Furthermore, I only succeeded return one row. </p>
  
  <pre><code>=INDEX(B2:D6,MATCH(A10,A2:A6,0),1)
  </code></pre>
  
  <p>This only gives me one IN parameter. With Prod2 this would only return one row.   </p>
  
  <p>With inputs "Prod2" and 1000:</p>
  
  <pre><code>ProdGroup         Diameter
  Prod2             1000
  </code></pre>
  
  <p>I want an outcome like this:</p>
  
  <pre><code>Prod2           600             1000            2017-12-18
  Prod2           840             1000            2019-06-27
  </code></pre>
  
  <p>I have no idea on how to go about doing this. Can somebody please help?</p>
  
  <p>Kind regards
  pbdude</p>