Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Prob an easy one: How do i copy a formula EXACTLY as it is | Excel Worksheet Functions | |||
Formula prob - or is it validation? | New Users to Excel | |||
CSE Formula Prob | Excel Worksheet Functions | |||
Counting prob | Excel Discussion (Misc queries) | |||
Still have formula prob :o( | Excel Programming |