title: Is there an efficient way to update data from one sheet to another with a match of a cell
body: <p>I have a sheet that has a main tab and a data tab. I update the data tab daily by copying from a daily report I get automatically from a reporting portal. I dump that data into the data tab and have written some code to update some of the columns in the main tab. The code matches the loan number in column C, if  a match is found it executes the copy and paste.
  The code works perfectly but it is slow as I've added other columns to copy.
  I am asking the experts to review my code and maybe show me a more efficient way of writing the code so it can run faster. The data it is searching through is only a couple of hundred rows, I don't think it should take too long.
  Here is my code:</p>
  <pre><code>Sub Update_Data()
  ActiveSheet.Unprotect Password:=&quot;Mortgage1&quot;
  Application.ScreenUpdating = False
  Dim stNow As Date
  Dim sourceRng As Range
  Dim destRng As Range
  stNow = Now
  lrowloans = Worksheets(&quot;Main&quot;).Range(&quot;A6&quot;).End(xlDown).Row
  lrowdata = Worksheets(&quot;Data&quot;).Range(&quot;C11&quot;).End(xlDown).Row
  Set sourceRng = Worksheets(&quot;Main&quot;).Range(&quot;A6:A&quot; &amp; lrowloans)
  Set destRng = Worksheets(&quot;Data&quot;).Range(&quot;C11:C&quot; &amp; lrowdata)
      Dim match As Boolean
      For Each sRng In sourceRng
  If sRng.Value &lt;&gt; &quot;&quot; Then
     With destRng
       Set dRng = .Find(What:=sRng.Value, After:=Worksheets(&quot;Data&quot;).Range(&quot;C11&quot;), LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
       If Not dRng Is Nothing Then
           Set pasteRng = Worksheets(&quot;Main&quot;).Range(&quot;E&quot; &amp; sRng.Row)
           Set copyRng = Worksheets(&quot;Data&quot;).Range(&quot;G&quot; &amp; dRng.Row &amp; &quot;:H&quot; &amp; dRng.Row)
           copyRng.Copy pasteRng
           Set pasteRng = Worksheets(&quot;Main&quot;).Range(&quot;B&quot; &amp; sRng.Row)
           Set copyRng = Worksheets(&quot;Data&quot;).Range(&quot;D&quot; &amp; dRng.Row &amp; &quot;:E&quot; &amp; dRng.Row)
           copyRng.Copy pasteRng
           Set pasteRng = Worksheets(&quot;Main&quot;).Range(&quot;D&quot; &amp; sRng.Row)
           Set copyRng = Worksheets(&quot;Data&quot;).Range(&quot;U&quot; &amp; dRng.Row &amp; &quot;:U&quot; &amp; dRng.Row)
           copyRng.Copy pasteRng
           Set pasteRng = Worksheets(&quot;Main&quot;).Range(&quot;M&quot; &amp; sRng.Row)
           Set copyRng = Worksheets(&quot;Data&quot;).Range(&quot;Q&quot; &amp; dRng.Row &amp; &quot;:Q&quot; &amp; dRng.Row)
           copyRng.Copy pasteRng
           Set pasteRng = Worksheets(&quot;Main&quot;).Range(&quot;K&quot; &amp; sRng.Row)
           Set copyRng = Worksheets(&quot;Data&quot;).Range(&quot;AP&quot; &amp; dRng.Row &amp; &quot;:AP&quot; &amp; dRng.Row)
           copyRng.Copy pasteRng
           Set pasteRng = Worksheets(&quot;Main&quot;).Range(&quot;N&quot; &amp; sRng.Row)
           Set copyRng = Worksheets(&quot;Data&quot;).Range(&quot;AW&quot; &amp; dRng.Row &amp; &quot;:AW&quot; &amp; dRng.Row)
           copyRng.Copy pasteRng
       End If
     End With
  End If
  Next
  
  Application.ScreenUpdating = True
  ActiveSheet.Protect Password:=&quot;Mortgage1&quot;
  End Sub
  </code></pre>