title: loop through vlookup with VBA
body: <p>I am not an expert in VBA, so I stumble into a problem now!</p>
  
  <p>I have a sheet with a button (say update sintetic*)
  * sintetic is the name of the workbook to be updated</p>
  
  <p>I need to update sintetic through a vlookup formula, which is working fine, this is the code:</p>
  
  <pre><code>  Sub update sintetic()
      '
  
  '
  
  'disable everything so macro goes faster
  Application.ScreenUpdating = False
  Application.Calculation = xlCalculationManual
  Application.EnableEvents = False
  ActiveSheet.DisplayPageBreaks = False
  
  'opens the workbook to be written
      Windows("sintetic.xlsx").Activate
  
  'formula goes here
      Range("c2").FormulaR1C1 = _
          "=VLOOKUP(RC[-2]&amp;RC[-1],'[Gross.xlsb]dados'!C39:C40,2,0)"
      Range("c3").FormulaR1C1 = _
          "=VLOOKUP(RC[-2]&amp;RC[-1],'[Gross.xlsb]dados'!C39:C40,2,0)"
  
  'breaks the link
      ActiveWorkbook.BreakLink Name:= _
          "gross.xlsb", Type:=xlExcelLinks
  
  'enables everything again
  Application.Calculation = xlCalculationAutomatic
  Application.ScreenUpdating = True
  Application.Calculation = xlCalculationAutomatic
  Application.EnableEvents = True
  ActiveSheet.DisplayPageBreaks = True
  
  End Sub
  </code></pre>
  
  <p>The problem is: I need to update 900 cells, in the code above, I am updating only 2 cells ( c2 and c3)I don´t want to copy and paste 900 lines, so, is there a way to loop through a range with the code above? Say c1:c1000, also, the 100 cells that will not be found should be blank.</p>
  
  <p>This is a very specific request, so I found nothing to help me, if anyone can shed a light, it would be appreciated!</p>