View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default my code is adding single quotes

Try activecell.formula (not .formulaR1C1).

DKY wrote:

My code here ActiveCell.FormulaR1C1 = "=VLOOKUP(D" & i &
",kickoutrange,6,FALSE)" that's in my macro is adding a formula that
looks like this.
=VLOOKUP('D2',kickoutrange,6,FALSE)"
when I want it to look like this
=VLOOKUP(D2,kickoutrange,6,FALSE)"
why is it adding the single quotes around D2?

--
DKY
------------------------------------------------------------------------
DKY's Profile: http://www.excelforum.com/member.php...o&userid=14515
View this thread: http://www.excelforum.com/showthread...hreadid=392663


--

Dave Peterson