title: Copy relative formula in excel with VBA
body: <p>I'm trying to copy formulas with relative row and column names. </p>
  
  <p>I have base column with 10 formulas and I'm trying to copy formula 5 times on columns on the right.</p>
  
  <p>So for example in base column i have this formula
  =A1+B1 and i want to make next cell this =B1+C1 next =C1+D1 and so on.</p>
  
  <p>I have this code</p>
  
  <pre><code>For i = 1 To Range("B1").Value
          For j = 1 To 10
              Sheet2.Cells(5 + j, 2 + i).FormulaR1C1 = "=c[-1]"
          Next j
  Next i
  </code></pre>
  
  <p>But this just copies value from left cell</p>
  
  <p>It would be easy if the formulas were same but they are different. So im trying to find a way to dynamically reference always left cell.</p>
  
  <p>This is one of the real formulas</p>
  
  <pre><code>='Balance sheet'!B13*360/'P&amp;L'!B2
  </code></pre>
  
  <p>I want next cell to be </p>
  
  <pre><code>='Balance sheet'!C13*360/'P&amp;L'!C2
  </code></pre>
  
  <p>And with code i have now next cell is <code>=B3</code></p>