title: Excel VBA: More efficient way to compare values with formulas for large range
body: <p>I have large table with values in range H2:PIG2202. I need to compare the first rows H2:PIG2 values with all other rows values. And if there is a match in the result table it pastes just those values which matched. 
  Now I'm using this formula in the result table to display needed values:</p>
  
  <pre><code>=IF(sheet!H$2=sheet!H3;IF(AND(sheet!H3;ISBLANK(sheet!H3))=FALSE;sheet!H3;"");"")
  </code></pre>
  
  <p>The VBA code is:</p>
  
  <pre><code>Sub find()
  Application.ScreenUpdating = False
  Range("H2:PIG2202").FormulaR1C1 = _
  "=IF('sheet'!R2C='sheet'!R[1]C,IF(AND('sheet'!R[1]C,ISBLANK('sheet'!R[1]C))=FALSE,'sheet'!R[1]C,""""),"""")"
  Application.ScreenUpdating = True
  End Sub
  </code></pre>
  
  <p>The problem is that Excel shows an error when I run this macros that there are not enough system resources.</p>
  
  <p>Also I would like that in the result table would be just values, not formulas.</p>
  
  <p>Is that possible to do? I have no idea how to achieve this :(</p>
  
  <p>Thank you in advance!</p>