Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default formula variable prob.

I have a formula,

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

that 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 but I cannot code "cC" programatically.

Can someone help me with this problem.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default formula variable prob.

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



HarryGuy wrote:

I have a formula,

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

that 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 but I cannot code "cC" programatically.

Can someone help me with this problem.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default formula variable prob.

Thanks very much Dave and my apologies to the group for doubling-up on the
request - had an internal problem.


"Dave Peterson" wrote in message
...
ActiveCell.FormulaR1C1 _
= "=(Origin!RC[" & cC & "]-Origin!R3C[" & cC &"])/Origin!R3C[" & cC &
"]"



HarryGuy wrote:

I have a formula,

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

that 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 but I cannot code "cC" programatically.

Can someone help me with this problem.


--

Dave Peterson



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
Prob an easy one: How do i copy a formula EXACTLY as it is ant1983 Excel Worksheet Functions 9 November 27th 09 05:59 AM
Formula prob - or is it validation? suewho New Users to Excel 10 September 1st 08 04:50 PM
CSE Formula Prob pdberger Excel Worksheet Functions 4 February 16th 08 03:51 AM
Counting prob superkopite Excel Discussion (Misc queries) 13 January 23rd 06 09:18 AM
Still have formula prob :o( Libby Excel Programming 5 December 11th 03 05:26 PM


All times are GMT +1. The time now is 11:08 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"