title: Match three columns on two worksheet and copying like rows on both sheets to a new sheet
body: <pre><code>Dim rOriginal As Range          'row records in the lookup sheet (cList = Sheet2)
  Dim rFind As Range              'row record in the target sheet (TotalList = Sheet1)
  Dim rTableOriginal As Range     'row records in the lookup sheet (cList = Sheet2)
  Dim rTableFind As Range         'row record in the target sheet (TotalList = Sheet1)
  Dim shOriginal As Worksheet
  Dim shFind As Worksheet
  Dim booFound As Boolean
  Dim shMix As Worksheet
  
  'Initiate all used objects and variables
  Set shOriginal = ThisWorkbook.Sheets("Male")
  Set shFind = ThisWorkbook.Sheets("Female")
  Set shMix = ThisWorkbook.Sheets("Mix")
  Set rTableOriginal = shOriginal.Range(shOriginal.Rows(2), shOriginal.Rows(shOriginal.Rows.count).End(xlUp))
  Set rTableFind = shFind.Range(shFind.Rows(2), shFind.Rows(shFind.Rows.count).End(xlUp))
  booFound = False
  
        For Each rOriginal In rTableOriginal.Rows
         booFound = False
           For Each rFind In rTableFind.Rows
             'Check if the E and F column contain the same information
                 If rOriginal.Cells(1, 1) = rFind.Cells(1, 1) And rOriginal.Cells(1, 13) = rFind.Cells(1, 13) And rOriginal.Cells(1, 11) = rFind.Cells(1, 11) Then
                   'The record is found so we can search for the next one
                      booFound = True
                      GoTo FindNextOriginal 'Alternatively use Exit For
                 End If
           Next rFind
  
              'In case the code is extended I always use a boolean and an If statement to make sure we cannot
              'by accident end up in this copy-paste-apply_yellow part!!
              If booFound = True Then
                  'If not found then copy form the Original sheet ...
                  rOriginal.Copy
                  rFind.Copy
                  '... paste on the Find sheet and apply the Yellow interior color
                  With shMix.Rows(Mix.Rows.count + 1)
                      .PasteSpecial
  
                  End With
  
              End If
  
  FindNextOriginal:
          Next rOriginal
  </code></pre>
  
  <p>So I have searched the site and came up with the codes above. But it still doesn't seem to work. My objective is to match 3 columns on sheet "Male" with another 3 columns on sheet "Female" if it matches, the code will then copy the row on both sheets and paste it on sheet "Mix". The columns I am trying to compare are columns A , K and M respectively.</p>
  
  <p>Example:</p>
  
  <pre><code>Column A | Column K | Column M
  1/1/2000 | 20       | 1 
  2/1/2000 | 21       | 4 
  3/1/2000 | 22       | 5 
  
  1/1/2000 | 20       | 1 
  4/1/2000 | 24       | 3 
  6/1/2000 | 25       | 6 
  </code></pre>
  
  <p>Copy row 1 on both worksheet and paste it in sheet "Mix"</p>