I want to copy the formulas from one row and paste it onto number of rows depending upon how many rows copied from source-file. I am copying formulas from one row into array and assigning the same array to all the next rows using for loop. I am either getting values pasted or same formulas for example =B1+c1 in to all rows instead of incremental cell numbers like =B99+C99
So far I tried assigning .formula to object and assigning back from array to FormulaArray - this is applying {} to the formula and pasting same formula in each row. There are rows over 200K. -formula to array and array to formula - this is failing -value to array and array to value - Obviously this gives just values.
vArray2 = Wb1.Worksheets("Gains Data").Range("AZ2:CJ2").Formula
Dim i1 As Long
For i1 = Row2 To Row3
Wb1.Sheets("Gains Data").Range(Cells(i1, Col1), Cells(i1,
Col2)).FormulaArray = vArray2
Next i1
How to preserve the formula but still get the formulas applied to the incremental cell values. Instead of getting =B2 + C2 into all the rows, I want =B10100 + C10100