tags:

views:

7800

answers:

5

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?

Thanks

+13  A: 

Have you tried escaping with a double-quote?

= "Maurice ""The Rocket"" Richard"

YonahW
Works like a charm.
Allain Lalonde
Would that be a 'double double-quote'? :)
Jonathan Leffler
If you want a string that just consists of a double quote, you need """" which I make a double double double-quote.
Mike Woodhouse
+3  A: 

Alternatively, you can use the CHAR function:

= "Maurice " & CHAR(34) & "Rocket" & CHAR(34) & " Richard"
Dave DuPlantis
A: 

thank you, worked like a charm

rob
A: 

thank you so much for the post

V K Ravi
A: 

will this work for macros using .Formula = "=THEFORMULAFUNCTION("STUFF")" so it would be like: will this work for macros using .Formula = "=THEFORMULAFUNCTION(CHAR(34) & STUFF & CHAR(34))"

eric
Don't know if this particular syntax is available in VBA. Give it a try.
Allain Lalonde
Looks like a yes: http://bytes.com/topic/access/insights/575414-quotes-double-quotes-where-when-use-them
Allain Lalonde