copy formula in a range
You can either:
have the code enter the formula in C4
than have the code fill the formula down.
or
Range("C4:E4").FormulaR1C1= ((Cells(RC7) + 1) ^ (theYear)) - 1
The R1C1 uses row and column numbers instead of Alpha/Numeric
R without a number refers to the row that the formula is in
C7 refers to column 7
--
steveB
Remove "AYN" from email to respond
"Monique" wrote in message
...
I want to copy a formula across a range.
theYear = Range("A1") - Range("A3")
range("C4") = ((Range("C7") + 1) ^ (theYear)) - 1
For a specified number across (cellSrc) it will paste the formula which
will
be changed to:
range("D4") = (Range("D7") +1) ^ (theYear)) - 1
range("E4") = (Range("E7") +1) ^ (theYear)) - 1
Until it gets to the cellSrc value (an integer that counts the contract
term
# of years)
I have no idea where to begin writing a formula that will change
accordingly. Can someone please help me?
Thanks
|