string problem

D

David McRitchie

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

pwz

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
 
P

pwz

Dear David,

Greatly thank for your hint!

HTH
Patrick

David McRitchie said:
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

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
 
Top