Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy formula in a range
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I copy a vlookup formula without changing the data range? | Excel Worksheet Functions | |||
range of Formula copy but not changing the content | Excel Discussion (Misc queries) | |||
formula to copy last positive number in range of cells | Excel Worksheet Functions | |||
How to copy formula from one cell to a range? | Excel Programming | |||
Copy Excel Spreadsheet formula to a range via VB6 | Excel Programming |