Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default quotation marks in string


Robin;6985201 Wrote:
Hi. I am trying to create a string variable that will include quotation
marks
but am struggling. The line of code is in a loop and changes as the
loops are
completed. Line of code is as follows:
cell1 = "=one 1"
If m 0 Then cell1 = """ & cell1 & """ & "&char(10)&" & """ &
Range("D2").Offset(m, 0) & """
The char(10) is a carriage-return to put the new text on a new line.
If the new cell1 is 'two 2', then I want cell1 to become ="one
1"&char(10)&"two 2"
BUT, the quotation marks are giving me problems. Any ideas how I can
get
around this?

When using the amperand (&) type this after it Chr(34), this will give
you one quote for a set of two it would look like
Code:
--------------------
& Chr(34) & Chr(34) &
--------------------
Regards,
Simon


--
Simon Lloyd
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Quotation Marks 9pluck9 Excel Discussion (Misc queries) 2 May 2nd 07 04:40 PM
VBA vlookup error depending on text string & quotation marks xlcharlie Excel Programming 2 July 19th 06 03:00 PM
without quotation marks? jfazz Excel Discussion (Misc queries) 1 March 2nd 06 04:43 PM
Quotation Marks - When and What?? heski Excel Discussion (Misc queries) 2 February 7th 06 12:40 PM
Passing string arguments that have quotation marks in them Caro-Kann Defence[_2_] Excel Programming 2 April 21st 05 03:26 PM


All times are GMT +1. The time now is 06:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"