<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Carriage Returns in Excel</title>
	<link>http://ask.metafilter.com/32460/Carriage-Returns-in-Excel/</link>
	<description>Comments on Ask MetaFilter post Carriage Returns in Excel</description>
	<pubDate>Fri, 10 Feb 2006 14:16:04 -0800</pubDate>
	<lastBuildDate>Fri, 10 Feb 2006 14:16:04 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Carriage Returns in Excel</title>
		<link>http://ask.metafilter.com/32460/Carriage-Returns-in-Excel</link>	
		<description>It&apos;s not how I&apos;d choose to spend my Friday evening, but for the last few hours, I&apos;ve been trying to replace carriage returns that have turned up in an Access and Excel file, and drawing a blank. &lt;br /&gt;&lt;br /&gt; I&apos;ve done a thorough search of the archive, and I don&apos;t think this has come up before. I&apos;ve also googled around and looked at specialist forums to no avail.&lt;br&gt;
&lt;br&gt;
So, someone&apos;s kindly entered the text of about 200 articles into an Access database. They&apos;re destined for a website. Each one is paragraphed with what I assume are standard carriage returns which I need to turn into html paragraphs. (Once this is done, I plan to somehow import them articles and their metadata into the right columns of a mysql database.)&lt;br&gt;
&lt;br&gt;
At the moment, I&apos;m working on this data in Excel, which was the only way I could find to access it on my Mac. I&apos;m also more au fait with Excel than Access.&lt;br&gt;
&lt;br&gt;
I&apos;ve tried a find and replace on the column of article texts, only to find that there&apos;s no way to tell Excel to find a return.&lt;br&gt;
&lt;br&gt;
Another horrible hack I thought up was to use &apos;Text to Columns&apos; using the returns as a delimiter. I could then have inserted tags and concatenated the new columns back together. Again I found no way to specify the return as a delimiter.&lt;br&gt;
&lt;br&gt;
I found &lt;a href=&quot;http://www.excelforum.com/archive/index.php/t-332280.html&quot;&gt;this&lt;/a&gt; note on a way to specify character codes, but I couldnt&apos; make it work in these two cases. Are Mac character codes different?&lt;br&gt;
&lt;br&gt;
I tried to use these character codes by adding a column next to the article text column (which is column K) with this formula:&lt;br&gt;
=SUBSTITUTE(K2,CHAR(010),&quot;&lt;/p&gt;&quot;)&lt;br&gt;
&lt;br&gt;
Again, no dice. It makes no substitutions at all.&lt;br&gt;
&lt;br&gt;
Finally, I saved as a .csv, opened it in Textwrangler, and used an appropriate regular expression. It made the changes, but then I couldn&apos;t open the file in Excel. Something about a Sylk error.&lt;br&gt;
&lt;br&gt;
If there&apos;s a simple way to do this in Access that I missed, I could go back to that.&lt;br&gt;
&lt;br&gt;
Am I going to have to use VBA? There&apos;s a suggestion at the foot of &lt;a href=&quot;http://www.gossamer-threads.com/forum/General_C8/Databases_and_SQL_F36/Delete_Carriage_return_query_P259718/&quot;&gt;this thread&lt;/a&gt;, but I don&apos;t know how to make it work.&lt;br&gt;
&lt;br&gt;
As always, I&apos;ll be very grateful for any help at all.</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2006:site.32460</guid>
		<pubDate>Fri, 10 Feb 2006 14:02:14 -0800</pubDate>
		<dc:creator>godawful</dc:creator>
		
			<category>excel</category>
		
			<category>access</category>
		
			<category>whitespace</category>
		
			<category>formatting</category>
		
			<category>html</category>
		
			<category>visualbasic</category>
		
	</item> <item>
		<title>By: grateful</title>
		<link>http://ask.metafilter.com/32460/Carriage-Returns-in-Excel#507552</link>	
		<description>I know Word has a built-in tool for replacing special characters, but I don&apos;t know if you want to go down the path of porting this data through too many applications...</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.32460-507552</guid>
		<pubDate>Fri, 10 Feb 2006 14:16:04 -0800</pubDate>
		<dc:creator>grateful</dc:creator>
	</item><item>
		<title>By: godawful</title>
		<link>http://ask.metafilter.com/32460/Carriage-Returns-in-Excel#507555</link>	
		<description>I had a look at Word. It suggests ^p to find a paragraph break. That&apos;s not giving me any matches on my data.&lt;br&gt;
&lt;br&gt;
I also tried ^l, ^m and ^b for line breaks or whatever.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.32460-507555</guid>
		<pubDate>Fri, 10 Feb 2006 14:21:59 -0800</pubDate>
		<dc:creator>godawful</dc:creator>
	</item><item>
		<title>By: patrickje</title>
		<link>http://ask.metafilter.com/32460/Carriage-Returns-in-Excel#507556</link>	
		<description>create a second column =SUBSTITUTE(SUBSTITUTE(A2,CHAR(13),&quot;&quot;),CHAR(10),&quot;&amp;lt;br&amp;gt;&quot;).  This will handle both UNIX and Windows carriage return-line feed combinations.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.32460-507556</guid>
		<pubDate>Fri, 10 Feb 2006 14:22:02 -0800</pubDate>
		<dc:creator>patrickje</dc:creator>
	</item><item>
		<title>By: MotorNeuron</title>
		<link>http://ask.metafilter.com/32460/Carriage-Returns-in-Excel#507562</link>	
		<description>Godawful,&lt;br&gt;
&lt;br&gt;
I think I could write the VBA to fix this problem, but I&apos;m not sure I understand what&apos;s happening.&lt;br&gt;
&lt;br&gt;
The article is in column &quot;K&quot;, right?  You need to replace each carriage return with the HTML paragraph code?  (IE: replace CR with &quot;p&quot; in brackets)?&lt;br&gt;
&lt;br&gt;
If so, I think I might be able to tackle this for you (assuming the Windows VB code will port properly to the Mac).</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.32460-507562</guid>
		<pubDate>Fri, 10 Feb 2006 14:26:19 -0800</pubDate>
		<dc:creator>MotorNeuron</dc:creator>
	</item><item>
		<title>By: godawful</title>
		<link>http://ask.metafilter.com/32460/Carriage-Returns-in-Excel#507563</link>	
		<description>Cheers Patrick, that formula has found the paragraph breaks. However, it&apos;s not replacing them with &amp;lt;br&amp;gt;. Any idea why not?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.32460-507563</guid>
		<pubDate>Fri, 10 Feb 2006 14:28:10 -0800</pubDate>
		<dc:creator>godawful</dc:creator>
	</item><item>
		<title>By: godawful</title>
		<link>http://ask.metafilter.com/32460/Carriage-Returns-in-Excel#507565</link>	
		<description>When I say it&apos;s not replaced them, I mean, they&apos;re gone, but the new string of text is without the &amp;lt;br&amp;gt;s.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.32460-507565</guid>
		<pubDate>Fri, 10 Feb 2006 14:29:54 -0800</pubDate>
		<dc:creator>godawful</dc:creator>
	</item><item>
		<title>By: patrickje</title>
		<link>http://ask.metafilter.com/32460/Carriage-Returns-in-Excel#507572</link>	
		<description>try this  =SUBSTITUTE(SUBSTITUTE(A2,CHAR(10),&quot;&quot;),CHAR(13),&quot;&amp;lt;br&amp;gt;&quot;) I had my carriage return and line-feed mixed up.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.32460-507572</guid>
		<pubDate>Fri, 10 Feb 2006 14:35:09 -0800</pubDate>
		<dc:creator>patrickje</dc:creator>
	</item><item>
		<title>By: godawful</title>
		<link>http://ask.metafilter.com/32460/Carriage-Returns-in-Excel#507573</link>	
		<description>Thanks very much MotorNeuron. Your description of the problem is accurate. If you still want to try, that would be great. (I&apos;m a complete VB Newbie, however).</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.32460-507573</guid>
		<pubDate>Fri, 10 Feb 2006 14:35:51 -0800</pubDate>
		<dc:creator>godawful</dc:creator>
	</item><item>
		<title>By: godawful</title>
		<link>http://ask.metafilter.com/32460/Carriage-Returns-in-Excel#507575</link>	
		<description>Brilliant, Patrick. I owe you one.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.32460-507575</guid>
		<pubDate>Fri, 10 Feb 2006 14:38:08 -0800</pubDate>
		<dc:creator>godawful</dc:creator>
	</item>
	</channel>
</rss>
