title: Check if cell input matches another cell input from list
body: <p>I'm new to coding with excel vba, but i have an excel map with a list of superiors and a list of potential successor. Now i got the task to create an excel map where you can put in the position of a superior into an Input Box and it should automatically show you the successors that fit based on their current position
  e.g. only heads of departments can become CEO.</p>
  <pre><code>For Each Column1 In Range(&quot;D3:D6&quot;).Columns
  For Each cell1 In Column1.Cells
  For Each Column2 In Range(&quot;N3:N6&quot;).Columns
  For Each cell2 In Column2.Cells
  
  If cell1.Value = &quot;MM&quot; And cell2.Value = &quot;AL&quot; Or cell2.Value = &quot;MM Asp.&quot; Or cell2.Value = &quot;Tagesvertretung&quot; Or cell2.Value = &quot;MM-Stv.&quot; Or cell2.Value = &quot;VM&quot; Or cell2.Value = &quot;FM&quot; Then
  cell2.Interior.ColorIndex = 10
  ElseIf cell1.Value = &quot;FM&quot; And cell2.Value = &quot;AL&quot; Or cell2.Value = &quot;MM&quot; Then
  cell2.Interior.ColorIndex = 10
  ElseIf cell1.Value = &quot;VM&quot; And cell2.Value = &quot;MM&quot; Then
  cell2.Interior.ColorIndex = 1
  ElseIf cell1.Value = &quot;VL&quot; And cell2.Value = &quot;VM&quot; Or cell2.Value = &quot;FM&quot; Then
  cell2.Interior.ColorIndex = 10
  ElseIf cell1.Value = &quot;VD&quot; And cell2.Value = &quot;VM&quot; Or cell2.Value = &quot;FM&quot; Or cell2.Value = &quot;VL&quot; Then
  cell2.Interior.ColorIndex = 10
  ElseIf cell1.Value = &quot;MM-Stv.&quot; And cell2.Value = &quot;AL&quot; Then
  cell2.Interior.ColorIndex = 10
  Else
  cell2.Interior.ColorIndex = 3
  End If
  
  Next
  Next
  Next
  Next
  </code></pre>
  <p>Theoretically it does what i want it to although it either colors the cells wrong or it only changes the colo of the whole range (N3:N6) when i change the last cell (N6)</p>
  <p>Thanks in advance for your help</p>