MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Escape Character


Posted by Baje on December 10, 2001 9:11 AM

Hi,
I am using a function Replace that replaces a specified substring with another inside a string. I want to remove double quotes but when I place one in the double quotes in the function it just does not work, it expects another doublw quote. If I use 2 double quotes the function does nothing. Is there an escape character that I could use so that I could get the function to search for double quote characters.

Posted by Aladin Akyurek on December 10, 2001 9:26 AM

You can use

CHAR(34)

as the substring that must be replaced.

Aladin

========

Posted by Baje on December 10, 2001 11:19 AM

It isn't working. I am getting an error that the sub/function is not defined. Is there another way?

Posted by Baje on December 10, 2001 11:27 AM

I found the function. It is actually Chr(34). Thank you.

Posted by Aladin Akyurek on December 10, 2001 12:16 PM

Baje --

CHAR is a built-in function in Excel and Chr is I guess an equivalent construct in VBA.

Aladin