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!
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
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.
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
So, there is no way to paste the text in notepad without quotes?
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: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.Mana Burtner|Zack Radzavich|Ranee Minger|Margarito Bede|Carmel Shum|Alonzo Jefferis|France Dehetre|Russ Slauson
Hope this helps.
Regards
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
Try...the codeSub 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
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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks