How to do double quotes in "cell language"?

P

Paul Schrum

I have cells of "built up" text strings like this:

="xy="&TEXT(O12,"0.0000")&","&TEXT(P12,"0.0000")


which, when displayed, look like this:
xy=2524950.0000,341717.0000


The problem is, I want the cells to look like this:
CadInputQueue.SendKeyin "xy=2524950.0000,341717.0000"


but Excel interprets the double-quotes as deliminters in the cell
formula. I know how to get around this in a programming language
(using escape sequences), but I can't figure it out in "cell"
language. Do you know how to do it?


Note: The format I am seeking is for copying then pasting into a
Microstation VBA module.

Also posted in microsoft.public.excel.misc, but there does not seem to
be much action over there.

- Paul Schrum
 
G

GS

Paul Schrum has brought this to us :
I have cells of "built up" text strings like this:

="xy="&TEXT(O12,"0.0000")&","&TEXT(P12,"0.0000")


which, when displayed, look like this:
xy=2524950.0000,341717.0000


The problem is, I want the cells to look like this:
CadInputQueue.SendKeyin "xy=2524950.0000,341717.0000"


but Excel interprets the double-quotes as deliminters in the cell
formula. I know how to get around this in a programming language
(using escape sequences), but I can't figure it out in "cell"
language. Do you know how to do it?


Note: The format I am seeking is for copying then pasting into a
Microstation VBA module.

Also posted in microsoft.public.excel.misc, but there does not seem to
be much action over there.

- Paul Schrum

Try this...

Put the cell contents into a string variable and pass that as the arg
for your SendKeyin method.

Example:
Dim sz As String
sz = Cells(?, ?).Value
CadInputQueue.SendKeyin = sz
 
J

joeu2004

I have cells of "built up" text strings like this:
="xy="&TEXT(O12,"0.0000")&","&TEXT(P12,"0.0000")
which, when displayed, look like this:
xy=2524950.0000,341717.0000
The problem is, I want the cells to look like this:
CadInputQueue.SendKeyin "xy=2524950.0000,341717.0000"

In Excel, we would write:

="""xy="&TEXT(O12,"0.0000")&","&TEXT(P12,"0.0000")&""""

That is, a double-quote as character in a string is represented by a
pair of double-quotes in a formula.

Does that help you at all?
 
P

Paul Schrum

In Excel, we would write:

="""xy="&TEXT(O12,"0.0000")&","&TEXT(P12,"0.0000")&""""

That is, a double-quote as character in a string is represented by a
pair of double-quotes in a formula.

Does that help you at all?

Yes. Someone in the .misc group gave me that answer as well, and it
works perfectly.

Thanks for your help.

- Paul
 
C

Clif McIrvin

In Excel, we would write:

="""xy="&TEXT(O12,"0.0000")&","&TEXT(P12,"0.0000")&""""

That is, a double-quote as character in a string is represented by a
pair of double-quotes in a formula.

Does that help you at all?

Yes. Someone in the .misc group gave me that answer as well, and it
works perfectly.

Thanks for your help.

- Paul


Paul, I perhaps should have suggested that a cross-post to both groups
would have been preferable to the multi-post (identical postings to more
than one group) that you used. With a cross-post, everyone can see the
responses from either ng.

And yes, cross-posting is acceptable practice when not over-used.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top