title: marco running extremely slow and doesnt return result
body: <p>I was trying to make unique identifiers in two different worksheet and do a loopup see if any unmatch, if there is unmatch, will indicate "new this month" on sheet1, however, my code below is running very slow and I did not even get the result, please help</p>
  
  <pre><code>Sub Mycomp ()
  
  Dim sht1 As Worksheet
  Dim lastrow2 As Integer
  Dim j As Integer
  Dim m As Integer
  Dim n As Integer
  
  Dim sht4 As Worksheet
  Dim lastrow As Integer
  Dim i As Integer
  Dim x As Integer
  Dim a As Integer
  
  
  Dim mycompariosn As Integer
  
  
  'concatenate column 1and column 5 in sheet 1, and generate result in column 20
  
  lastrow2 = Worksheets(1).UsedRange.Rows.Count
  
  For n = 1 To lastrow2
  
  Worksheets(1).Cells(n, 20).Value = Worksheets(1).Cells(n, 1).Value &amp; Worksheets(1).Cells(n, 5).Value
  
  Next n
  
  'concatenate column 1and column 5 in sheet 1, and generate result in column 20
  
  lastrow = Worksheets(4).UsedRange.Rows.Count
  
  
  For a = 1 To lastrow
  
  Worksheets(4).Cells(a, 20).Value = Worksheets(4).Cells(a, 1).Value &amp; Worksheets(4).Cells(a, 5).Value
  
  Next a
  
  'compare the two column 20 in sheet 1 and sheet 4, find any new row in sheet1 with a return "New in This month" if it is new
  
  For n = 1 To lastrow2
      For a = 1 To lastrow
  
      mycompariosn = StrComp(Worksheets(1).Cells(n, 20).Value, Worksheets(4).Cells(a, 20).Value, vbTextCompare)
  
      If mycompariosn = 1 Then Worksheets(1).Cells(n, 7).Value = "New in This month"
  
      Next a
  
  Next n
  
  End Sub
  </code></pre>