View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
ymgagnon ymgagnon is offline
external usenet poster
 
Posts: 7
Default How can I copy plain text from Excel to Notepad?

That might be a bit complicated. It's pulling data from across two tabs,
combining static text with entered values to creat individual lines of the
header, and then the header itself is put together by that final concatenate.
So...the final formula looks like ('Product Lookup - bin' being the second
tab where the lines are being assembled):

=CONCATENATE('Product Lookup - bin'!A4,'Product Lookup - bin'!A5,'Product
Lookup - bin'!A6,'Product Lookup - bin'!A7,'Product Lookup - bin'!A8,'Product
Lookup - bin'!A9,'Product Lookup - bin'!A10,'Product Lookup -
bin'!A11,'Product Lookup - bin'!A12,'Product Lookup - bin'!A13,'Product
Lookup - bin'!A14,'Product Lookup - bin'!A15,'Product Lookup -
bin'!A16,'Product Lookup - bin'!A17,'Product Lookup - bin'!A18,'Product
Lookup - bin'!A19,'Product Lookup - bin'!A20,'Product Lookup -
bin'!A21,'Product Lookup - bin'!A22,'Product Lookup - bin'!A23,'Product
Lookup - bin'!A24,)

Here are a couple from the other tab:
A4: ="/*File Name: "&'Product Lookup'!B4
A5: =CHAR(10)&"|"
A6: =CHAR(10)&"| Script Description: "&MID('Product Lookup'!B6,1,28)

(And so on...)


"JP" wrote:

Can you post the formula?

--JP

On Oct 1, 3:27 pm, ymgagnon
wrote:
Yes. And it does seem to be an issue with the newline character CHAR(10)
(ASCII 10). But I tried with CHAR(13) instead to see if it would be handled
better...and no luck. I'd like to avoid washing it through too many
steps...but I got it to work if I drop it in Word, then save as a text file.
I'd like it to be as easy to hand over to someone else as possible, though,
and don't relish trying to explain to everyone else who uses it how to save
Word docs as text in the correct format...



"JP" wrote:
When you select the cell, press Ctrl-C to copy, then switch to Notepad
and paste, is that what happens?


--JP


On Oct 1, 2:58 pm, ymgagnon
wrote:
I have used the CONCATENATE function to put together a header for a SQL
script all in one cell. In Excel, this uses CHAR(10) as the newline
character, and displays on multiple lines within a single cell. I would like
to be able to copy this to Notepad so I can make a "clean" version to send
along to DBAs, but when it moves to Notepad, I get a big mess of non-printing
characters. (And if I use the CLEAN function in Excel, the format goes away
entirely)


Any ideas how to preserve the format in the cell, but still have the text
copyable to Notepad?