yliew
Civil/Environmental
- Jan 16, 2002
- 19
Dear All,
My question this time is a bit harder
I am trying to fill a column with a bunch of formula BUT I need the formula to increase by by the product of i as we go down the cells.
From the following simple example you will see that I am trying to fill 11 cells beginning with "I4" downwards. Say R5C5 = 1 and R1C1 =2. The results will be 2 for all the 11 cells. But what I am trying to do is to have each cells to increase by the product of "i". E.g. 0, 2, 4, 6, 8, 10...20.
___________
For i = 0 To 10
Range("I4"
.Offset(i, 0).FormulaR1C1= _
"=R5C5*R1C1"
Next i
____________
It would be easy if we can write something like
**********
For i = 0 To 10
Range("I4"
.Offset(i, 0).FormulaR1C1= _
"=R5C5*R1C1*i"
Next i
**********
But I cannot do that... so I am wondering if there is better way to do it?
Thanks in advance!
Regards,
YEN
My question this time is a bit harder
I am trying to fill a column with a bunch of formula BUT I need the formula to increase by by the product of i as we go down the cells.
From the following simple example you will see that I am trying to fill 11 cells beginning with "I4" downwards. Say R5C5 = 1 and R1C1 =2. The results will be 2 for all the 11 cells. But what I am trying to do is to have each cells to increase by the product of "i". E.g. 0, 2, 4, 6, 8, 10...20.
___________
For i = 0 To 10
Range("I4"
"=R5C5*R1C1"
Next i
____________
It would be easy if we can write something like
**********
For i = 0 To 10
Range("I4"
"=R5C5*R1C1*i"
Next i
**********
But I cannot do that... so I am wondering if there is better way to do it?
Thanks in advance!
Regards,
YEN