title: How can I create a list based on another list where a category contains specific value?
body: <p>So to make it easy let's say I have a table of 3 columns and x rows.
  These 3 columns are called;</p>
  
  <ul>
  <li>Name</li>
  <li>Price</li>
  <li>Type</li>
  </ul>
  
  <p>Under <strong>Name</strong> there'd be a list of e.g. [Apple, Banana, Steak, Kiwi, Spagetti]. </p>
  
  <p>Then under <strong>Price</strong> would be e.g. [2, 1, 5, 2, 3]</p>
  
  <p>And under <strong>Type</strong> would be [Fruit, Fruit, Meat, Fruit, Pasta]</p>
  
  <p>Now I want to make a list somewhere separate that uses this list as base and then automatically updates as such;</p>
  
  <ul>
  <li>Get the <strong>Name</strong> where <strong>Type</strong> = "Fruit"</li>
  <li>If the name already exists in this list, skip the row and look to the next (no duplicates)</li>
  <li>When <em>user</em> inserts something in the middle of the list or append to it, update the order that the items are in the same order to the list we're reading from. (Stay in order)</li>
  <li>[optional] Print these in order in a column, with in the cell next to it (next column) the corresponding <strong>Price</strong></li>
  </ul>
  
  <p>The last one is optional because I could of course replace <strong>Name</strong> with <strong>Price</strong> where <strong>Type</strong> = Fruit, and get the wanted result.</p>
  
  <p>However I'm not sure how to do this. Currently I have;</p>
  
  <pre><code>=INDEX($A$2:$A$100,MATCH("Fruit", $C$2:$C$100,0),1)
  </code></pre>
  
  <p>However this would return only the first occurrence of said MATCH in the array.</p>
  
  <p>Simply making it like this;</p>
  
  <pre><code>=INDEX(A2:A100,MATCH("GAME", C2:C100,0),1)
  </code></pre>
  
  <p>Would give duplicates.</p>
  
  <p>Also neither of these lines give the attached <strong>Price</strong>.</p>
  
  <p>I've also been playing around, trying to make my own function, but I really just got into it so I'm not quite sure what I'm doing or even supposed to be doing.</p>
  
  <p><strong>TL;DR</strong> I'd like to make the 2 groups on the right automatically based on the first group as shown in the picture below:
  <a href="https://i.stack.imgur.com/6RZqR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6RZqR.png" alt="enter image description here"></a></p>