LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Variable in formula problem

I have a formula,

ActiveCell.FormulaR1C1 = "=(Origin!RC[cC]-Origin!R3C[cC])/Origin!R3C[cC]"

which I want to insert into "A3", "B3" etc. for about 30 additional columns.
I then plan to extend the results to the last cell down each column, using
"Auto-Fill". "cC" is a variable in the formula.

For example:

rts.Cells(ratdtR + 1, ratdtC + g).Select

Selection = "=(Origin!RC[3]-Origin!R3C[3])/Origin!R3C[3]"

Selection.AutoFill Destination:=Range(Cells(invdtR + 1, invdtC + g),
Cells(lstcelR, invdtC + g)),Type:=xlFillDefault

works (assuming cC = 3) but I do not know how to code "cC" programatically.

Can someone help me with this problem.




 
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
Problem with MATCH Formula for different book by variable name Pam[_7_] Excel Programming 9 March 22nd 07 08:48 PM
Having a problem using a variable to add a 'name' Kobayashi[_49_] Excel Programming 1 October 29th 04 02:22 PM
Excel VBA-use variable in active cell formula problem waveracerr Excel Programming 9 February 6th 04 02:49 PM
vba variable problem joao Excel Programming 3 December 15th 03 04:31 PM
Problem trying to us a range variable as an array variable TBA[_2_] Excel Programming 4 September 27th 03 02:56 PM


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

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

About Us

"It's about Microsoft Excel"