title: Looping Through EXCEL VBA Dictionary
body: <p>I have a VBA Dictionary with the following data:</p>
  
  <pre><code>ID       NAME       POSITION 
  5008004  John Doe   00120096
  5008002  John Doe2  00117886
  5010010  John Doe3  00117886
  </code></pre>
  
  <p>I have an Excel documented with the following cells:</p>
  
  <pre><code>POSITION    SUPERVISOR_NAME
  00117886    John Doe
  00117886    John Doe2
  00117886    John Doe3
  </code></pre>
  
  <p>Current Excel VBA code loops through the dictionary in the following fashion:</p>
  
  <pre><code>If SUPERVISOR_NAME &lt;&gt; "" Then
      For Each myKey In superDictionary.Keys
              If superDictionary(myKey) = SUPERVISOR_NAME Then
                  SUPERVISOR_NAME = myKey
                  Exit For
              End If
          Next
  End If
  </code></pre>
  
  <p>Resulting in replacing the JOHN DOE names with their associated IDs no matter what.</p>
  
  <p><strong>Question:</strong> How do I go about replacing the JOHN DOE names with their associated IDs BUT only when the POSITION and SUPERVISOR_NAME from EXCEL matches the Dictionary or ELSE submit nothing.</p>