View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] scott_smith@standardlife.com is offline
external usenet poster
 
Posts: 8
Default Quick Inverted Comma Question

Hi,

Can anyone help me work out the correct syntax for this in VBA? I'm
pretty sure the problem is to do with nesting of of inverted commas...
It's driving me crazy!

Activecell.Value = "=IF(ISNA(VLOOKUP(TRIM($A3),INDIRECT(""&" &
Left(EndAddress,1) &"""$2&"""!$P$2:$X$""" &DailyFinalRow &"),
9,FALSE))", 0, VLOOKUP(TRIM($A3),INDIRECT(""""&" & Left(EndAddress,1)
&"$2&"!$P$2:$X$" &DailyFinalRow &"),9,FALSE))"


The final results should be this:

=IF(ISNA(VLOOKUP(TRIM($A3),INDIRECT(""&D$2&"!$P$2: $X$32"),9,FALSE)),
0, VLOOKUP(TRIM($A3),INDIRECT(""&D$2&"!$P$2:$X$32"),9 ,FALSE))

Thanks!