Closed Thread
Results 1 to 11 of 11

Thread: Excel add quotes when copy/paste text in notepad

  1. #1
    Registered User
    Join Date
    04-15-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2007
    Posts
    51

    Excel add quotes when copy/paste text in notepad

    When i copy text from excel cell into notepad the text is surrounded with quotes. Is it possible to format the cells in a way when i copy text from them the text not to be surrounded with quotes when pasting it in notepad?


    Thanks!

  2. #2
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,176

    Re: Excel add quotes when copy/paste text in notepad

    I'm not sure why that's happening for you. It doesn't for me.

    Perhaps you could post a sample workbook with the data that ends up with quotes around it.

    Regards

  3. #3
    Registered User
    Join Date
    04-15-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Excel add quotes when copy/paste text in notepad

    I uploaded some example excel file with names in a cell. If i copy the names in a notepad++ they have quotes around them. If i copy the names in windows notepad the names are not just surrounded with quotes but they are pasted in horizontal order with square symbols between them.
    Attached Files Attached Files

  4. #4
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,176

    Re: Excel add quotes when copy/paste text in notepad

    The square symbols are the carriage return/line feed characters that you have inserted to force the names onto separate lines. Notepad is unable to interpret them. The quotes are to ensure that all the characters are treated as one "item"

    Regards

  5. #5
    Registered User
    Join Date
    04-15-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Excel add quotes when copy/paste text in notepad

    So, there is no way to paste the text in notepad without quotes?

  6. #6
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,176

    Re: Excel add quotes when copy/paste text in notepad

    I guess this relates to the format of the data. If you copy and paste "simple" text, you don't get quote marks.

    The Carriage Return/New Line/Form Feed/whatever is character 10.

    If you substitute the Carriage Return for some other character, you can copy and paste the text and not get quotes ... but you still won't get the data appearing as it does in the Excel cell.

    For example:

    =SUBSTITUTE(A1,CHAR(10),"|")

    will give you:

    Mana Burtner|Zack Radzavich|Ranee Minger|Margarito Bede|Carmel Shum|Alonzo Jefferis|France Dehetre|Russ Slauson
    and this pastes into Notepad as:

    Mana Burtner|Zack Radzavich|Ranee Minger|Margarito Bede|Carmel Shum|Alonzo Jefferis|France Dehetre|Russ Slauson
    Notice that there are no quote marks and no square blocks.

    Hope this helps.

    Regards

  7. #7
    Registered User
    Join Date
    05-06-2011
    Location
    Dontrang, Korea
    MS-Off Ver
    Excel 2003
    Posts
    1

    Lightbulb Re: Excel add quotes when copy/paste text in notepad

    Quote Originally Posted by TMShucks View Post
    I guess this relates to the format of the data. If you copy and paste "simple" text, you don't get quote marks.

    The Carriage Return/New Line/Form Feed/whatever is character 10.

    If you substitute the Carriage Return for some other character, you can copy and paste the text and not get quotes ... but you still won't get the data appearing as it does in the Excel cell.

    For example:

    =SUBSTITUTE(A1,CHAR(10),"|")

    will give you:



    and this pastes into Notepad as:



    Notice that there are no quote marks and no square blocks.

    Hope this helps.

    Regards
    Spot on, it is because one of the cells you are pasting has a line break inside without the corresponding html code to represent it. Put all the cell contents on one line and Bob's your uncle

  8. #8
    Registered User
    Join Date
    01-05-2012
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Excel add quotes when copy/paste text in notepad

    Hi,

    Just a quick note about a SOLUTION that worked for me.

    I used the CLEAR function and it worked for me.

    Put the cells you want to copy inside CLEAR, for example:
    =clear(A1)

    A1 - the cell with the data you want to copy to notepad w/out the quotes...

    Hope this works for you

  9. #9
    Forum Guru pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,150

    Re: Excel add quotes when copy/paste text in notepad

    Try...the code
    Sub ptest()
        Dim lname As String
    
        Open ThisWorkbook.Path & "\stuff.txt" For Output As #1
        lname = Replace(Range("A1").Value, Chr(10), " ")
    
        Print #1, lname
        Write #1, lname
       
        
        Close #1
    End Sub
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    VBA for smarties - snb

  10. #10
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,176

    Re: Excel add quotes when copy/paste text in notepad

    Not sure why this thread has taken on a new lease of life. It started in May last year with a couple of replies and, as far as I can see (or recall), no response from the OP (in the thread, PM or rep).

    Perhaps the re-awakening is as a result of the recent improvements on the board?


    Regards, TMS

  11. #11
    Forum Guru pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,150

    Re: Excel add quotes when copy/paste text in notepad

    True, did not notice the date . I'll lock the thread
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    VBA for smarties - snb

Closed Thread

Thread Information

Users Browsing this Thread

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

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.2.0