Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for any help.
I have alot of rows of formula to change, and am trying to speed things up with the below code. But, when I run this, I get apostrophes where I don't need them. Any idea why? For i = 19 To 53 Cells(i, 6).FormulaR1C1 = "=VLOOKUP(D" & i & ",Plan_Group_Month,MONTH(Report_Date)+3, FALSE)" Next i But this puts (for example, in row 25) the below in, with apostrophes around the Dxx. =VLOOKUP('D25',Plan_Group_Month,MONTH(Report_Date) +3, FALSE) I tried this too, but got an error Cells(i, 6).FormulaR1C1 = "=VLOOKUP(D" & Str(i) & ",Plan_Group_Month,MONTH(Report_Date)+3, FALSE)" Thanks for any help |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are in R1C1 mode. Change
Cells(i, 6).FormulaR1C1 = to Cells(i, 6).Formula = -- HTH... Jim Thomlinson "Ian Elliott" wrote: Thanks for any help. I have alot of rows of formula to change, and am trying to speed things up with the below code. But, when I run this, I get apostrophes where I don't need them. Any idea why? For i = 19 To 53 Cells(i, 6).FormulaR1C1 = "=VLOOKUP(D" & i & ",Plan_Group_Month,MONTH(Report_Date)+3, FALSE)" Next i But this puts (for example, in row 25) the below in, with apostrophes around the Dxx. =VLOOKUP('D25',Plan_Group_Month,MONTH(Report_Date) +3, FALSE) I tried this too, but got an error Cells(i, 6).FormulaR1C1 = "=VLOOKUP(D" & Str(i) & ",Plan_Group_Month,MONTH(Report_Date)+3, FALSE)" Thanks for any help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I change this code? | Excel Discussion (Misc queries) | |||
VBA Code to Change the Tab Name | Excel Discussion (Misc queries) | |||
change SUMIF formula into a vb code | Excel Discussion (Misc queries) | |||
change the code to be a formula | Excel Discussion (Misc queries) | |||
change DAO code to ADO | Excel Programming |