Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Quotation Marks | Excel Discussion (Misc queries) | |||
VBA vlookup error depending on text string & quotation marks | Excel Programming | |||
without quotation marks? | Excel Discussion (Misc queries) | |||
Quotation Marks - When and What?? | Excel Discussion (Misc queries) | |||
Passing string arguments that have quotation marks in them | Excel Programming |