title: Filtering Columns According to Two Value Thresholds
body: <p>If I can only have a maximum of 2 <code>Lateral</code> and a maximum of 3 <code>Zagueiro</code>, and they <strong>cannot repeat values from Column 3</strong>, how should I do it?</p>
  <p>I've already tried using <code>QUERY</code> with multiple <code>&quot;Limit&quot;</code> and already tried using <code>FILTER(ISNA(MATCH()))</code> but in both options the desired answer is not found.</p>
  <p>Note: There can be no preference between <code>Lateral</code> and <code>Zagueiro</code>, the sequence of values is what counts as a rule, the higher, the more important.</p>
  <p>Note 2: It may happen to find less than 2 <code>Lateral</code> or less than 3 <code>Zagueiro</code></p>
  <p>Example Data:</p>
  <pre><code>Filipe Luís            Lateral          Flamengo
  Willian Arão           Zagueiro         Flamengo
  Aderlan                Lateral          Bragantino
  Mariano                Lateral          Atlético-MG
  Nathan Silva           Zagueiro         Atlético-MG
  Tinga                  Lateral          Fortaleza
  Marcelo Benevenuto     Zagueiro         Fortaleza
  Fabrício Bruno         Zagueiro         Vasco
  Joaquim                Lateral          Vasco
  </code></pre>
  <p>Example Expected Result:</p>
  <pre><code>Filipe Luís            Lateral          Flamengo
  Aderlan                Lateral          Bragantino
  Nathan Silva           Zagueiro         Atlético-MG
  Marcelo Benevenuto     Zagueiro         Fortaleza
  Fabrício Bruno         Zagueiro         Vasco
  </code></pre>
  <p>Note 3: It was a coincidence that the values in <code>Column 2</code> were perfectly separated, it can happen that the <code>Zagueiro</code> is above the <code>Lateral</code>, between two <code>Lateral</code> and so on. There is no specific sequence, everything goes according to the original sequence of data.</p>
  <p>Note 4: <code>Column 2</code> will only have the two values mentioned, there will be no others.</p>
  <p><strong>Link To Spreadsheet:</strong></p>
  <p><a href="https://docs.google.com/spreadsheets/d/1JmX7V2zAYh-O0POOc0BpRp9ejcgLFRtsGZwlruRgHdY/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1JmX7V2zAYh-O0POOc0BpRp9ejcgLFRtsGZwlruRgHdY/edit?usp=sharing</a></p>