ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   string problem (https://www.excelbanter.com/excel-programming/301946-string-problem.html)

david mcritchie

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





pwz

string problem
 
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



pwz

string problem
 
Dear David,

Greatly thank for your hint!

HTH
Patrick

"David McRitchie" wrote in message
...
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








All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com