Results 1 to 3 of 3

Adding CHAR(10) to add line breaks causes speech marks to be added

Threaded View

Fozzy279 Adding CHAR(10) to add line... 03-13-2020, 11:42 AM
Richard Buttrey Re: Adding CHAR(10) to add... 03-13-2020, 12:07 PM
BMV Re: Adding CHAR(10) to add... 03-13-2020, 12:10 PM
  1. #1
    Registered User
    Join Date
    03-13-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    1

    Adding CHAR(10) to add line breaks causes speech marks to be added

    I have what appear to be a simple problem - yet a solution is proving rather elusive!!

    I have a spreadsheet which generates 4 lines of configuration. Presently, I have to take the resulting text from each cell - and paste it in line by line. I thought it would be easier to generate a single string with Carriage Return (CR) characters so I could paste all lines in one go. However, When I add the CHAR(10) CR character - it adds speech marks round the first line of config:

    4 lines of text from each cell pasted individually:
    set security nat static rule-set CUST-A rule FW-10-10-0-20 description "Test Lab - London1 - 99999998"
    set security nat static rule-set CUST-A rule FW-10-10-0-20 match destination-address 10.10.0.20/32
    set security nat static rule-set CUST-A rule FW-10-10-0-20 then static-nat prefix 192.168.1.20/32
    set security nat static rule-set CUST-A rule FW-10-10-0-20 then static-nat prefix routing-instance INTERNET"

    However when I concatenate the values- either using "&" or CONCATENATE(x,y,z,etc) and puttting a & CHAR(10) CR/newline at the end of each, the result is:

    "set security nat static rule-set CUST-A rule FW-10-10-0-20 description ""Test Lab - London1 - 99999998""
    set security nat static rule-set CUST-A rule FW-10-10-0-20 match destination-address 10.10.0.20/32
    set security nat static rule-set CUST-A rule FW-10-10-0-20 then static-nat prefix 192.168.1.20/32
    set security nat static rule-set CUST-A rule FW-10-10-0-20 then static-nat prefix routing-instance INTERNET"

    You can see the first line has additional " characters in it.

    Any ideas anyone? Probably something to do with the speech marks, but these have to be in as shown in the first example....

    Many thanks...
    R
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. adding line breaks in cell, keeping words on same line
    By beba420 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2017, 07:45 PM
  2. Replies: 8
    Last Post: 03-10-2015, 01:05 AM
  3. Formula to remove speech marks
    By james19 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-07-2014, 11:20 AM
  4. [SOLVED] Unable to get cell count when using line breaks char(10)
    By Ronoh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-01-2014, 01:10 PM
  5. how to remove text contained with speech marks
    By pablowilks in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2012, 03:32 PM
  6. Adding a formula to a cell. Speech marks
    By Typicalalex1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-07-2011, 07:36 AM
  7. [SOLVED] Why does a sumif use double speech marks
    By owl37 in forum Excel General
    Replies: 1
    Last Post: 11-24-2005, 10:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1