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: 46
Default how change formula with this code?

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
 
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 change this code? OrlaLynch Excel Discussion (Misc queries) 1 June 11th 08 03:06 PM
VBA Code to Change the Tab Name Gary''s Student Excel Discussion (Misc queries) 0 March 28th 07 12:05 AM
change SUMIF formula into a vb code ASU Excel Discussion (Misc queries) 1 September 6th 06 07:08 PM
change the code to be a formula Little pete Excel Discussion (Misc queries) 1 November 30th 05 07:29 PM
change DAO code to ADO franco Excel Programming 1 September 13th 05 12:39 AM


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