title: Running a nested If/Match
body: <p>I have 4 columns of data. They are two separate columns of First Name/Last Name columns copied and pasted together.</p>
  <p>What I want to do is run a match on the last names and IF they are equal, run a match on the first names.</p>
  <p>The column ranges are dynamic which is why running a CONCATENATE and VLOOKUP formula works, but if I can get something less involved it'd be great.</p>
  <pre><code>   A       B        C      D      E
  1 Last  First   Last2   First2
  2 Sharma  Abhi  Smith   Kevin
  3 Philip  Matt  Smith   GEORGIA
  4 Franc   Pete  John    Bon Jovi 
  5 Arnold  Susan Jack    White
  6 Mallo   Chad  Sharma  Katie
  7 Daigle  Steve Sharma  Abhi
  </code></pre>
  <p>My thought is that starting in cell E2 it should return a match or not a match (in this case only Row 2 should return a match. Currently it's returning a match every time - which is definitely not right.</p>
  <p>This is the code I've written so far</p>
  <pre><code>Sub matchFunction()
  
  On Error Resume Next
  
  Dim BW_Row As Long
  Dim BW_Clm As Long
      Table1 = Sheet2.Range(&quot;F11:F16&quot;) ' Range of all appointments last name
      Table2 = Sheet2.Range(&quot;$G$11:$G$16&quot;) ' Range of all appointments first name
      Table3 = Sheet2.Range(&quot;$H$11:$H$16&quot;) ' Range of leads
      BW_Row = Sheet2.Range(&quot;J11&quot;).Row ' Change E column if it's a match
      BW_Clm = Sheet2.Range(&quot;J11&quot;).Column
      
          For Each c In Table1
              
              For Each d In Table2
                      
                  If Application.Match(c, Table3, 0) &lt;&gt; &quot;&quot; Then
                      
                      If Application.Match(d, Table3, 0) &lt;&gt; &quot;&quot; Then
                      
                              Sheet2.Cells(BW_Row, BW_Clm) = &quot;It's a Match!&quot;
                      
                          Else
                                  
                              Sheet2.Cells(BW_Row, BW_Clm) = &quot;Sorry, it's not a match&quot;
                              
                      
                      End If
                      
                  End If
                      
          
          BW_Row = BW_Row + 1
          
          Next d
          
      Next c
                    
   MsgBox &quot;Matching Finished&quot;
  
  End Sub
  </code></pre>