Thread: string problem
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
external usenet poster
 
Posts: 691
Default string problem

You have to double the double quotes within the double quotes.
strg = "=ISNA(MATCH(A9,INDIRECT(SUBSTITUTE($A$2,"" "","""")),0))"

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"pwz" wrote in message ...
Hello,

I got an error message from following string variable declaration:

dim strg as string
strg = "=ISNA(MATCH(A9,INDIRECT(SUBSTITUTE($A$2," ","")),0))"

error message "expected: end of statement"

It passed the compiler if I removed all " from substitute function.
Will appreciate for any help!


Patrick