<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Automating pastevalues</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2005/10/19/automating-pastevalues/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2005/10/19/automating-pastevalues/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Simon Herbert</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/19/automating-pastevalues/#comment-28005</link>
		<dc:creator>Simon Herbert</dc:creator>
		<pubDate>Thu, 11 Oct 2007 13:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1262#comment-28005</guid>
		<description>&lt;p&gt;Gates (and Dave) - that is why I prefer .value = .value&lt;/p&gt;
&lt;p&gt;I work with a lot of data that is imported as text.  Using this code I can quickly change to numeric format.&lt;/p&gt;
&lt;p&gt;I also use this to remove unwanted formating at the same time:&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt; Selection&lt;br&gt;
&#160; &#160;.Style = &lt;span class=&quot;st0&quot;&gt;&quot;Normal&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160;.Value = .Value&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>Gates (and Dave) &#8211; that is why I prefer .value = .value</p>
<p>I work with a lot of data that is imported as text.  Using this code I can quickly change to numeric format.</p>
<p>I also use this to remove unwanted formating at the same time:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">With</span> Selection<br />
&nbsp; &nbsp;.Style = <span class="st0">&#8220;Normal&#8221;</span><br />
&nbsp; &nbsp;.Value = .Value<br />
<span class="kw1">End</span> <span class="kw1">With</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gates Is, You Know</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/19/automating-pastevalues/#comment-26359</link>
		<dc:creator>Gates Is, You Know</dc:creator>
		<pubDate>Sat, 11 Aug 2007 19:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1262#comment-26359</guid>
		<description>&lt;p&gt;A corollary to Dave&#039;s sole post in this (undying?) thread about custom formats: Leading zeroes perish from .value=.value .  A1=RIGHT(1039,3)&#039;s &quot;039? becomes 39 in General format.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>A corollary to Dave&#8217;s sole post in this (undying?) thread about custom formats: Leading zeroes perish from .value=.value .  A1=RIGHT(1039,3)&#8217;s &#8220;039? becomes 39 in General format.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Adams</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/19/automating-pastevalues/#comment-21351</link>
		<dc:creator>Andrew Adams</dc:creator>
		<pubDate>Wed, 25 Oct 2006 20:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1262#comment-21351</guid>
		<description>&lt;p&gt;I was just doing a copy pastespecial on a pivot table and I found the value method worked if my selection was just the data and the headings in the pivot table. The old way I had before was to copy ( the same selection only data and headings) to the columns next to the pivot and then removing the pivot table columns.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I was just doing a copy pastespecial on a pivot table and I found the value method worked if my selection was just the data and the headings in the pivot table. The old way I had before was to copy ( the same selection only data and headings) to the columns next to the pivot and then removing the pivot table columns.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Jorgensen</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/19/automating-pastevalues/#comment-21294</link>
		<dc:creator>Peter Jorgensen</dc:creator>
		<pubDate>Wed, 18 Oct 2006 11:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1262#comment-21294</guid>
		<description>&lt;p&gt;This may or may not be a dead discussion but this appears not to work if you have charts/pivot tables on a spreadsheet. I&#039;m trying to automate reports and using Copy/PasteSpecial gets to the point where its using huge amounts of memory while trying to remove the formulas from worksheets so that when we distribute the report all they have is the values, but using Selection.Value = Selection.Value (or any of the variations suggested on this page) I get an application-defined or object-defined error (Error code 1004). Is there anohter way to automate pastevalues without looping through each cell?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This may or may not be a dead discussion but this appears not to work if you have charts/pivot tables on a spreadsheet. I&#8217;m trying to automate reports and using Copy/PasteSpecial gets to the point where its using huge amounts of memory while trying to remove the formulas from worksheets so that when we distribute the report all they have is the values, but using Selection.Value = Selection.Value (or any of the variations suggested on this page) I get an application-defined or object-defined error (Error code 1004). Is there anohter way to automate pastevalues without looping through each cell?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MikeC</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/19/automating-pastevalues/#comment-21100</link>
		<dc:creator>MikeC</dc:creator>
		<pubDate>Fri, 29 Sep 2006 09:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1262#comment-21100</guid>
		<description>&lt;p&gt;Generally, I would use Juan&#039;s first method within a large section of code, which I do a lot due to the sort of thing I have to churn out.&lt;/p&gt;
&lt;p&gt;For &quot;one-off&quot; instances of pasting values within a sheet (outside of running code), I added &quot;Paste Values&quot; as a right-click option - I prefer this to a keyboard shortcut (but I like the mouse. I wear out at least 2 a year...). The code to do so was snagged from somewhere, not sure entirely where (it was some time ago and I&#039;ve eaten, drunk beer and slept since then!) so unfortunately I can&#039;t credit the original poster (believe it was one of the gurus from the Excel Programming community at Microsoft.com)&lt;/p&gt;
&lt;p&gt;Run the following *once* (running more than once will add multiple occurrences of the option to your right-click, as I found out to my cost!!) and Paste Values will appear as a right-click option. &lt;/p&gt;
&lt;p&gt;Public Sub AddPV()&lt;br&gt;
    Dim iCtr As Long&lt;br&gt;
    iCtr = Application.CommandBars(&quot;Cell&quot;).FindControl(ID:=22).Index&lt;br&gt;
    Application.CommandBars(&quot;Cell&quot;).Controls.Add Type:=msoControlButton, ID:=370, Before:=iCtr + 1&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;Just in case anybody DOES make the mistake I did (and ends up with 37 Paste Values options....), the following will sort you out - it will remove one instance of Paste Values on each run:&lt;/p&gt;
&lt;p&gt;Public Sub TakeItOff()&lt;br&gt;
Set lbl = CommandBars.FindControl(Type:=msoControlButton, ID:=370)&lt;br&gt;
lbl.Delete (False)&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;Finally, apologies if I&#039;m teaching any grannies around here to suck eggs!! :-)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Generally, I would use Juan&#8217;s first method within a large section of code, which I do a lot due to the sort of thing I have to churn out.</p>
<p>For &#8220;one-off&#8221; instances of pasting values within a sheet (outside of running code), I added &#8220;Paste Values&#8221; as a right-click option &#8211; I prefer this to a keyboard shortcut (but I like the mouse. I wear out at least 2 a year&#8230;). The code to do so was snagged from somewhere, not sure entirely where (it was some time ago and I&#8217;ve eaten, drunk beer and slept since then!) so unfortunately I can&#8217;t credit the original poster (believe it was one of the gurus from the Excel Programming community at Microsoft.com)</p>
<p>Run the following *once* (running more than once will add multiple occurrences of the option to your right-click, as I found out to my cost!!) and Paste Values will appear as a right-click option. </p>
<p>Public Sub AddPV()<br />
    Dim iCtr As Long<br />
    iCtr = Application.CommandBars(&#8220;Cell&#8221;).FindControl(ID:=22).Index<br />
    Application.CommandBars(&#8220;Cell&#8221;).Controls.Add Type:=msoControlButton, ID:=370, Before:=iCtr + 1<br />
End Sub</p>
<p>Just in case anybody DOES make the mistake I did (and ends up with 37 Paste Values options&#8230;.), the following will sort you out &#8211; it will remove one instance of Paste Values on each run:</p>
<p>Public Sub TakeItOff()<br />
Set lbl = CommandBars.FindControl(Type:=msoControlButton, ID:=370)<br />
lbl.Delete (False)<br />
End Sub</p>
<p>Finally, apologies if I&#8217;m teaching any grannies around here to suck eggs!! <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harald Staff</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/19/automating-pastevalues/#comment-21096</link>
		<dc:creator>Harald Staff</dc:creator>
		<pubDate>Thu, 28 Sep 2006 19:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1262#comment-21096</guid>
		<description>&lt;p&gt;My norwegian Excel 2000 defaults to Global.xls. My US Excels 2000 and 2k3 default to Personal.xls. I&#039;d think names Global and Personal indicate different scopes, but I havent found any litterature on it. Is it just a reginal translation thing ?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>My norwegian Excel 2000 defaults to Global.xls. My US Excels 2000 and 2k3 default to Personal.xls. I&#8217;d think names Global and Personal indicate different scopes, but I havent found any litterature on it. Is it just a reginal translation thing ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/19/automating-pastevalues/#comment-21095</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 28 Sep 2006 18:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1262#comment-21095</guid>
		<description>&lt;p&gt;Keith -&lt;/p&gt;
&lt;p&gt;It appears you&#039;re confusing Normal.dot, Word&#039;s default always-on template, with personal.xls, Excel&#039;s always-on personal macro workbook.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Keith -</p>
<p>It appears you&#8217;re confusing Normal.dot, Word&#8217;s default always-on template, with personal.xls, Excel&#8217;s always-on personal macro workbook.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/19/automating-pastevalues/#comment-21094</link>
		<dc:creator>Keith</dc:creator>
		<pubDate>Thu, 28 Sep 2006 14:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1262#comment-21094</guid>
		<description>&lt;p&gt;To answer Hugo&#039;s question (from a year ago) for those who don&#039;t know... make sure that the VBA module in which this code resides is located in the Normal.xls file instead of the file you&#039;re working on. Normal.xls is the default file that is used whenever Excel opens.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>To answer Hugo&#8217;s question (from a year ago) for those who don&#8217;t know&#8230; make sure that the VBA module in which this code resides is located in the Normal.xls file instead of the file you&#8217;re working on. Normal.xls is the default file that is used whenever Excel opens.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Peterson</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/19/automating-pastevalues/#comment-17001</link>
		<dc:creator>Dave Peterson</dc:creator>
		<pubDate>Mon, 24 Oct 2005 23:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1262#comment-17001</guid>
		<description>&lt;p&gt;One of the differences I&#039;ve seen between &quot;.value = .value&quot; and &quot;copy&#124;paste special values&quot; occurs when a range contains constants that have been formatted character by character.&lt;/p&gt;
&lt;p&gt;(Sometimes the selection will contain both constants and formulas.)&lt;/p&gt;
&lt;p&gt;The &quot;.value = .value&quot; version is the one that kills that kind of formatting.&lt;/p&gt;
&lt;p&gt;Just a thought if you want to convert all the cells on a worksheet in one command.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>One of the differences I&#8217;ve seen between &#8220;.value = .value&#8221; and &#8220;copy|paste special values&#8221; occurs when a range contains constants that have been formatted character by character.</p>
<p>(Sometimes the selection will contain both constants and formulas.)</p>
<p>The &#8220;.value = .value&#8221; version is the one that kills that kind of formatting.</p>
<p>Just a thought if you want to convert all the cells on a worksheet in one command.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken Hallinen</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/19/automating-pastevalues/#comment-16995</link>
		<dc:creator>Ken Hallinen</dc:creator>
		<pubDate>Mon, 24 Oct 2005 13:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1262#comment-16995</guid>
		<description>&lt;p&gt;I&#039;ll second the value = value suggestion.  I stumbled across it when I was actually bombing excel trying to use the copy - paste.special values in an application I was building&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ll second the value = value suggestion.  I stumbled across it when I was actually bombing excel trying to use the copy &#8211; paste.special values in an application I was building</p>
]]></content:encoded>
	</item>
</channel>
</rss>

