I need to update the formulas in a number of cells (range("C12:G14")) using VBA. The formula is fairly simple, as it is just a reference to an other cell times a given value (along the lines of '=C5*Sheet2!A$1$').
I have tried doing this with the following script, but the column reference is causing me some trouble.
I have tried doing this with the following script, but the column reference is causing me some trouble.
Code:
For c = 2 To 7
For r = 12 To 14
Workbooks("Mappe2").Worksheets("Ark1").Cells(r, c).Formula = "=" & c & (r-7) & "*Sheet1!$A$1"
Next r
Next c