Displaying quotation marks

  • Thread starter Thread starter Craig Sink
  • Start date Start date
C

Craig Sink

How do I display quotation marks as text? For example:

="hello"&" Bob"
displays:
hello Bob

How do I display:
hello "Bob"

Thanks for any input,

Craig S.
FDI
 
And one more way if it really gets confusing...

msgbox "hello " & chr(34) & "Bob" & chr(34)
 
I actually had to "triple" them. Like this: ="hello"&A3&"""Bob"""
The reason is because I had to enter quotations to specify the text, and
then 2 more quotations to get the actual quotations. I think that made
sense.

Thanks for the help,
Craig, S
 
It seems weird that we need 3 (instead of 2) pairs to make it.
The first one is used to indicate there are strings.
Then the second one should make it clear that they are strings.
Strange to say, we need to add 1 more.

Is there any good reason to explain this behaviour?
 
0-0 Wai Wai ^-^ said:
It seems weird that we need 3 (instead of 2) pairs to make it.
The first one is used to indicate there are strings.
Then the second one should make it clear that they are strings.
Strange to say, we need to add 1 more.

Is there any good reason to explain this behaviour?
See Dave Peterson's post. The double quotes together represent chr(34)
and the single quotes around Bob specifies that the word is a string.

At least I think that how MS explains it.

Bill
 
Back
Top