Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I copy a vlookup formula without changing the data range? VickyL872 Excel Worksheet Functions 2 May 27th 08 06:45 PM
range of Formula copy but not changing the content aw Excel Discussion (Misc queries) 4 November 20th 07 05:00 AM
formula to copy last positive number in range of cells rolan Excel Worksheet Functions 6 May 14th 05 02:27 PM
How to copy formula from one cell to a range? Jason Weiss Excel Programming 1 April 22nd 05 03:54 PM
Copy Excel Spreadsheet formula to a range via VB6 Kevin Excel Programming 4 October 4th 04 09:44 PM


All times are GMT +1. The time now is 09:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"