ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to do double quotes in "cell language"? (https://www.excelbanter.com/excel-programming/444044-how-do-double-quotes-cell-language.html)

Paul Schrum

How to do double quotes in "cell language"?
 
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

GS[_5_]

How to do double quotes in "cell language"?
 
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

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc



joeu2004

How to do double quotes in "cell language"?
 
On Dec 21, 12:11*pm, Paul Schrum wrote:
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?

Paul Schrum

How to do double quotes in "cell language"?
 
On Dec 21, 5:01*pm, joeu2004 wrote:
On Dec 21, 12:11*pm, Paul Schrum wrote:

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?


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

Thanks for your help.

- Paul


Clif McIrvin[_3_]

How to do double quotes in "cell language"?
 
"Paul Schrum" wrote in message
...
On Dec 21, 5:01 pm, joeu2004 wrote:
On Dec 21, 12:11 pm, Paul Schrum wrote:

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?


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.

--
Clif McIrvin

(clare reads his mail with moe, nomail feeds the bit bucket :-)




All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com