<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Entrepremasochism &#187; prevent</title>
	<atom:link href="http://www.noahlh.com/blog/tag/prevent/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.noahlh.com/blog</link>
	<description>Figuring out the world, one day at a time.</description>
	<lastBuildDate>Thu, 03 Jul 2014 01:16:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4</generator>
		<item>
		<title>Temporarily Prevent a Worksheet&#8217;s Formulas from Updating in Excel</title>
		<link>http://www.noahlh.com/blog/2010/04/temporarily-prevent-a-worksheets-formulas-from-updating-in-excel/</link>
		<comments>http://www.noahlh.com/blog/2010/04/temporarily-prevent-a-worksheets-formulas-from-updating-in-excel/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 17:04:24 +0000</pubDate>
		<dc:creator>noahlh</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[formula]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[prevent]]></category>
		<category><![CDATA[updating]]></category>

		<guid isPermaLink="false">http://www.noahlh.com/blog/?p=12</guid>
		<description><![CDATA[This is the first in a series of extremely specific, nerdy posts I&#8217;ll make &#8211; not necessarily because I think a lot of people will be interested &#8211; but rather because I&#8217;m sure there will be a few specific people (&#8230;)</p><p><a href="http://www.noahlh.com/blog/2010/04/temporarily-prevent-a-worksheets-formulas-from-updating-in-excel/">Read the rest of this entry &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>This is the first in a series of extremely specific, nerdy posts I&#8217;ll make &#8211; not necessarily because I think a lot of people will be interested &#8211; but rather because I&#8217;m sure there will be a few specific people who will be interested and will find this via the Googles.  Basically when I run into a weird problem and have to spend more than 10 seconds researching it, I think it&#8217;s only fair that I write up the solution in the hopes of saving some other folks out there a few minutes of time.</p>
<p>So for this case, I created a big multi-page spreadsheet and need to (temporarily) prevent one of the pages from allowing the formulas to update (while allowing other pages to update).  In this case there are a ton of formulas on the page, so changing the formulas themselves isn&#8217;t an option</p>
<p>The solution I found is in a very simple two-part macro.  Thanks to user &#8216;shg&#8217; from excelforum.com for posting this back in November 2008 (<a href="http://www.excelforum.com/excel-general/661154-prevent-formula-from-updating-when-deleting-cells-sheets.html" target="_blank">Original link</a>):</p>
<pre>
<pre dir="ltr"><span><span style="font-family: Arial; color: #000000; font-size: x-small;">Sub CommentFormulas()

    ' comments out all but array formulas
    Dim cell As Excel.Range

    With Application
        .ScreenUpdating = False
        .Calculation = xlManual
        For Each cell In ActiveSheet.UsedRange
            With cell
                If .HasFormula And Not .HasArray Then
                    .Formula = "'" &amp; .Formula
                End If
            End With
        Next
        .Calculation = xlAutomatic
        .ScreenUpdating = True
    End With
End Sub

Sub UncommentFormulas()
    ' restores commented formulas
    Dim cell As Excel.Range

    With Application
        .ScreenUpdating = False
        .Calculation = xlManual
        For Each cell In ActiveSheet.UsedRange
            With cell
                ' the left(cstr(cell)) below accommodates cells having errors
                If Left(CStr(.Value), 1) = "=" And Not .HasArray Then
                    .Formula = Trim(.Text)
                End If
            End With
        Next
        .Calculation = xlAutomatic
        .ScreenUpdating = True
    End With
End Sub

</span></span><span></span></pre>
<p>I made one small change in the second macro by allowing Excel to &#8216;trim&#8217; the converted text.  For some reason in my version (Excel 2003) running the UncommentFormulas macro.</p>
<p>What this does is convert all the formulas on a page to raw text with one macro (so you can change around other stuff without any of the formulas being affected &#8212; it essentially &#8216;freezes&#8217; the page), and then when you&#8217;re ready to turn the page &#8220;live&#8221; again, you use the second macro to turn everything back to normal.</p>
<p>Took a few minutes to get working, but it does work perfectly.  Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.noahlh.com/blog/2010/04/temporarily-prevent-a-worksheets-formulas-from-updating-in-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
