title: How can I compare specific ranges of data between two excel worksheets, identify the differences, and fill in the blanks?
body: <p>I cannot seem to solve this VBA riddle I've been working on, please help. I'm new at this and I'm probably over complicating it</p>
  
  <p>Essentially, there are two worksheets - one titled <em>Master</em> and the other will be created fresh daily by date. The <em>Master tab</em> contains 10000 rows of historical data filled from <em>Columns A:X</em>. The other tab generally has about 300 rows of fresh data and also contains like <em>Columns A:X</em>, only with blank cells in <em>Columns A:B</em>. I'm trying to find matches with the master tab, and if so, populate the corresponding results in cells A and B from the master to the daily. If nothing, leave blank. It is crucial that <em>Cells H:M</em> and <em>R:W</em> are identical matches.</p>
  
  <p>Below is my crazy attempt, Thank you in advance for helping</p>
  
  <pre><code>Sub Previous()
  
  Dim u As Long
  u = 2
  Do While ActiveSheet.Cells(u, 6) &lt;&gt; ""
      Dim i As Long
      i = 2
      Do While Worksheets("Master").Cells(i, 6) &lt;&gt; ""
          If ActiveSheet.Range(Cells(u, 8), Cells(u, 13)) _
              = Worksheets("Master").Range(Cells(i, 8), Cells(i, 13)) _
              And ActiveSheet.Range(Cells(u, 18), Cells(u, 23)) _
              = Worksheets("Master").Range(Cells(i, 18), Cells(i, 23)) _
              And ActiveSheet.Cells(u, 2) = "" Then
                  ActiveSheet.Range(Cells(u, 1), Cells(u, 2)) _
                  = Worksheets("Master").Range(Cells(i, 1), Cells(i, 2))
          Else: i = i + 1
          End If   
      Loop
      u = u + 1
      i = 2
  Loop
  End Sub
  </code></pre>