cell refs in formula

  • Thread starter Thread starter Boba
  • Start date Start date
B

Boba

Dear All;
How do I reference cells in formulas?
I need an example of VB macro that fills up
the cell range C1000:C2000 with formulas
so they show pairwise sums of A2000:A3000
and B3000:B4000 cells
//from C++
for(int i=0; i<1000; i++)
cellC[i+1000]=cellA[i+2000]+cellB[i+3000]
Thanks in advance.
 
Dear All;
How do I reference cells in formulas?
I need an example of VB macro that fills up
the cell range C1000:C2000 with formulas
so they show pairwise sums of A2000:A3000
and B3000:B4000 cells
//from C++
for(int i=0; i<1000; i++)
cellC[i+1000]=cellA[i+2000]+cellB[i+3000]
Thanks in advance.

try....

Range("C1000").FormulaR1C1 = "=SUM(RC[-2]:RC[-1])"
Range("C1000").AutoFill Destination:=Range("C1000:C3000"),
Type:=xlFillDefault
 
Back
Top