title: Find a String and list its corresponding values
body: <p>I am trying to work out on a formula in Excel. I will try and explain the same to the community here.</p>
  
  <p>I have a table as below:</p>
  
  <pre><code>Age    Gender     Name      Location
  21     Male       Andrew     Austin
  25     Male       Mike       LA
  27     Female     Marian     LA
  23     Female     Sara       NY
  24     Male       Terry      NJ
  </code></pre>
  
  <p>Now I want to put a search on the Gender and put all the other data fields in an array so that I get the results as below:</p>
  
  <p>3 Queries in 3 different tabs:</p>
  
  <ul>
  <li>Search "Male" and display corresponding Age</li>
  <li>Search "Male" and display corresponding Name</li>
  <li>Search "Male" and display corresponding Location</li>
  </ul>
  
  <p>Expected Output:</p>
  
  <p>Search "Male" and display corresponding Age
  21
  25
  24</p>
  
  <p>Search "Male" and display corresponding Name
  Andrew
  Mike
  Terry</p>
  
  <p>Search "Male" and display corresponding Location
  Austin
  LA
  NJ</p>
  
  <p>I hope the query is clear, if not then please let me know. I am trying to do all these in Excel. In Google Sheet it is very easy to do it but struggling in Excel.</p>
  
  <p>Thanks</p>
  
  <p>Tried with VLOOKUP but not able to get the array result.</p>