How can I construct the following string in an Excel formula:
Maurice "The Rocket" Richard
If I'm using single quotes, it's trivial = "Maurice 'The Rocket' Richard"
but what about double quotes?
You can also insert a double quote in an Excel formula using the CHAR function. The CHAR function takes the ASCII value and returns the corresponding character value. The ASCII value for a double quote is 34.
To place quotation marks in a string in your code In Visual Basic, insert two quotation marks in a row as an embedded quotation mark. In Visual C# and Visual C++, insert the escape sequence \" as an embedded quotation mark. For example, to create the preceding string, use the following code.
To have a double quote as a character in a string literal, do something like, char ident[] = "ab"cd"; The backslash is used in an escape sequence, to avoid conflict with delimiters. To have a double quote as a character, there is no need for the backslash: '”' is alright.
Have you tried escaping with an additional double-quote? By escaping a character, you are telling Excel to treat the " character as literal text.
= "Maurice ""The Rocket"" Richard"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With