<?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: Precision</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/08/11/precision/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/08/11/precision/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 18:06:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Wayne Thompson</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/11/precision/#comment-21576</link>
		<dc:creator>Wayne Thompson</dc:creator>
		<pubDate>Thu, 16 Nov 2006 16:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=714#comment-21576</guid>
		<description>&lt;p&gt;I happened to stumble across this post, and this seems to be just what I was looking for! I&#039;d like to try these, but am having problems integrating code into my w/s. I was trying to test by including code with a click button, but the VB screen doesn&#039;t take simply cutting/pasting code in.  I think it&#039;s getting hung up on the underscores, quotes, and returns. I&#039;ve tried deleting the underscores and replacing quotes with ones from my own keyboard, and looked like it was at least accepting the code, but am really having a problem with the &quot; &#039;if cell is a value in the used area, continue &quot; section. It&#039;s making a lot of the code red (which means there&#039;s an compile error?).I&#039;ve taken a VB course about 6 years ago and am very rusty, but remember a few things. &lt;/p&gt;
&lt;p&gt;Any suggestions with cutting and pasting the two examples above?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I happened to stumble across this post, and this seems to be just what I was looking for! I&#8217;d like to try these, but am having problems integrating code into my w/s. I was trying to test by including code with a click button, but the VB screen doesn&#8217;t take simply cutting/pasting code in.  I think it&#8217;s getting hung up on the underscores, quotes, and returns. I&#8217;ve tried deleting the underscores and replacing quotes with ones from my own keyboard, and looked like it was at least accepting the code, but am really having a problem with the &#8221; &#8216;if cell is a value in the used area, continue &#8221; section. It&#8217;s making a lot of the code red (which means there&#8217;s an compile error?).I&#8217;ve taken a VB course about 6 years ago and am very rusty, but remember a few things. </p>
<p>Any suggestions with cutting and pasting the two examples above?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary Brown</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/11/precision/#comment-2143</link>
		<dc:creator>Gary Brown</dc:creator>
		<pubDate>Thu, 12 Aug 2004 21:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=714#comment-2143</guid>
		<description>&lt;p&gt;As an Accountant I also agree and have written some code to save time, so here&#039;s my 2 cents...&lt;/p&gt;
&lt;p&gt;&#039;/========================/&lt;br&gt;
Sub Rounding_Wrap()&lt;br&gt;
  &#039;Wrap &#039;Round&#039; function with user decided decimals around numbers _&lt;br&gt;
        and formulas only&lt;br&gt;
  Dim blnNumber As Boolean&lt;br&gt;
  Dim objCell As Object, objInput As Object&lt;br&gt;
  Dim strOriginalAddress As String&lt;br&gt;
  Dim strvarInputAddress As String&lt;br&gt;
  Dim strOrigCalcStatus As String&lt;br&gt;
  Dim varInput As Variant&lt;br&gt;
  Dim varRounding As Variant&lt;/p&gt;
&lt;p&gt;  On Error GoTo err_Sub&lt;/p&gt;
&lt;p&gt;  &#039;save calculation setting&lt;br&gt;
  Select Case Application.Calculation&lt;br&gt;
    Case xlCalculationAutomatic&lt;br&gt;
      strOrigCalcStatus = &quot;Automatic&quot;&lt;br&gt;
    Case xlCalculationManual&lt;br&gt;
      strOrigCalcStatus = &quot;Manual&quot;&lt;br&gt;
    Case xlCalculationSemiautomatic&lt;br&gt;
      strOrigCalcStatus = &quot;SemiAutomatic&quot;&lt;br&gt;
    Case Else&lt;br&gt;
      strOrigCalcStatus = &quot;Automatic&quot;&lt;br&gt;
  End Select&lt;/p&gt;
&lt;p&gt;  blnNumber = False&lt;br&gt;
  strOriginalAddress = Selection.Address&lt;/p&gt;
&lt;p&gt;  Set varInput = _&lt;br&gt;
    Application.InputBox(prompt:= _&lt;br&gt;
    &quot;Select Range of Numbers to be rounded &quot;, _&lt;br&gt;
    Default:=strOriginalAddress, Type:=8)&lt;/p&gt;
&lt;p&gt;  &#039;get how many cells have been selected and location&lt;br&gt;
  strvarInputAddress = varInput.Address&lt;/p&gt;
&lt;p&gt;  &#039;check to see if any cells have been selected&lt;br&gt;
  If varInput.Count = 0 Then&lt;br&gt;
    MsgBox &quot;Nothing Selected...&quot; &amp; vbCr &amp; vbCr &amp; _&lt;br&gt;
      &quot;Rounding procedure discontinued...&quot;, _&lt;br&gt;
      vbExclamation + vbOKOnly, &quot;Warning...&quot;&lt;br&gt;
    GoTo exit_Sub&lt;br&gt;
  End If&lt;/p&gt;
&lt;p&gt;  &#039;ask for rounding precision&lt;br&gt;
  varRounding = _&lt;br&gt;
    Application.InputBox(prompt:= _&lt;br&gt;
    &quot;Enter Number of places for cells to be rounded &quot;, _&lt;br&gt;
    Default:=2, Type:=1)&lt;/p&gt;
&lt;p&gt;  &#039;check to see if a number was entered for rounding precision&lt;br&gt;
  If Asc(varRounding) &lt;&gt; 48 Then&lt;br&gt;
    If Len(varRounding) = 0 Or varRounding &gt; 100 _&lt;br&gt;
      Or varRounding = False Then&lt;br&gt;
      MsgBox &quot;Rounding Amount Problem Encountered...&quot; &amp; _&lt;br&gt;
        vbCr &amp; vbCr &amp; _&lt;br&gt;
        &quot;Rounding procedure discontinued...&quot;, _&lt;br&gt;
        vbExclamation + vbOKOnly, &quot;Warning...&quot;&lt;br&gt;
      GoTo exit_Sub&lt;br&gt;
    End If&lt;br&gt;
  End If&lt;/p&gt;
&lt;p&gt;  &#039;only look in used area of the worksheet&lt;br&gt;
  Set varInput = Intersect(varInput.Parent.UsedRange, varInput)&lt;/p&gt;
&lt;p&gt;  &#039;create round formula&lt;br&gt;
  Application.Calculation = xlManual&lt;br&gt;
  For Each objCell In varInput&lt;/p&gt;
&lt;p&gt;    &#039;check if cell is a value&lt;br&gt;
    Select Case UCase(TypeName(objCell.value))&lt;br&gt;
      Case &quot;BYTE&quot;&lt;br&gt;
        blnNumber = True&lt;br&gt;
      Case &quot;CURRENCY&quot;&lt;br&gt;
        blnNumber = True&lt;br&gt;
      Case &quot;DECIMAL&quot;&lt;br&gt;
        blnNumber = True&lt;br&gt;
      Case &quot;DOUBLE&quot;&lt;br&gt;
        blnNumber = True&lt;br&gt;
      Case &quot;INTEGER&quot;&lt;br&gt;
        blnNumber = True&lt;br&gt;
      Case &quot;LONG&quot;&lt;br&gt;
        blnNumber = True&lt;br&gt;
      Case &quot;SINGLE&quot;&lt;br&gt;
        blnNumber = True&lt;br&gt;
      Case Else&lt;br&gt;
        blnNumber = False&lt;br&gt;
    End Select&lt;/p&gt;
&lt;p&gt;    &#039;if cell is a value in the used area, continue&lt;br&gt;
    If blnNumber = True Then&lt;br&gt;
      Select Case Asc(Left(objCell.Formula, 1))&lt;br&gt;
        Case 45      &#039;minus (-) sign&lt;br&gt;
          objCell.Formula = _&lt;br&gt;
            &quot;=ROUND(&quot; &amp; _&lt;br&gt;
            objCell.Formula &amp; &quot;,&quot; &amp; varRounding &amp; &quot;)&quot;&lt;br&gt;
        Case 48 To 57 &#039;numbers 0 thru 9&lt;br&gt;
          objCell.Formula = _&lt;br&gt;
            &quot;=ROUND(&quot; &amp; _&lt;br&gt;
            objCell.Formula &amp; &quot;,&quot; &amp; varRounding &amp; &quot;)&quot;&lt;br&gt;
        Case 61      &#039;equal (=) sign&lt;br&gt;
          objCell.Formula = _&lt;br&gt;
            &quot;=ROUND(&quot; &amp; _&lt;br&gt;
            Right(objCell.Formula, _&lt;br&gt;
            Len(objCell.Formula) - 1) &amp; _&lt;br&gt;
            &quot;,&quot; &amp; varRounding &amp; &quot;)&quot;&lt;br&gt;
      End Select&lt;br&gt;
    End If&lt;/p&gt;
&lt;p&gt;  Next objCell&lt;/p&gt;
&lt;p&gt;exit_Sub:&lt;br&gt;
  Set varInput = Nothing&lt;/p&gt;
&lt;p&gt;  &#039;re-set to original calculation method&lt;br&gt;
  Select Case strOrigCalcStatus&lt;br&gt;
    Case &quot;Automatic&quot;&lt;br&gt;
      Application.Calculation = xlCalculationAutomatic&lt;br&gt;
    Case &quot;Manual&quot;&lt;br&gt;
      Application.Calculation = xlCalculationManual&lt;br&gt;
    Case &quot;SemiAutomatic&quot;&lt;br&gt;
      Application.Calculation = xlCalculationSemiautomatic&lt;br&gt;
    Case Else&lt;br&gt;
      Application.Calculation = xlCalculationAutomatic&lt;br&gt;
  End Select&lt;/p&gt;
&lt;p&gt;  Exit Sub&lt;/p&gt;
&lt;p&gt;err_Sub:&lt;br&gt;
  MsgBox &quot;Error encountered...&quot; &amp; _&lt;br&gt;
    vbCr &amp; vbCr &amp; _&lt;br&gt;
    &quot;Rounding procedure discontinued...&quot;, _&lt;br&gt;
    vbExclamation + vbOKOnly, &quot;Warning...&quot;&lt;br&gt;
  GoTo exit_Sub&lt;/p&gt;
&lt;p&gt;End Sub&lt;br&gt;
&#039;/========================/&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>As an Accountant I also agree and have written some code to save time, so here&#8217;s my 2 cents&#8230;</p>
<p>&#8216;/========================/<br />
Sub Rounding_Wrap()<br />
  &#8216;Wrap &#8216;Round&#8217; function with user decided decimals around numbers _<br />
        and formulas only<br />
  Dim blnNumber As Boolean<br />
  Dim objCell As Object, objInput As Object<br />
  Dim strOriginalAddress As String<br />
  Dim strvarInputAddress As String<br />
  Dim strOrigCalcStatus As String<br />
  Dim varInput As Variant<br />
  Dim varRounding As Variant</p>
<p>  On Error GoTo err_Sub</p>
<p>  &#8216;save calculation setting<br />
  Select Case Application.Calculation<br />
    Case xlCalculationAutomatic<br />
      strOrigCalcStatus = &#8220;Automatic&#8221;<br />
    Case xlCalculationManual<br />
      strOrigCalcStatus = &#8220;Manual&#8221;<br />
    Case xlCalculationSemiautomatic<br />
      strOrigCalcStatus = &#8220;SemiAutomatic&#8221;<br />
    Case Else<br />
      strOrigCalcStatus = &#8220;Automatic&#8221;<br />
  End Select</p>
<p>  blnNumber = False<br />
  strOriginalAddress = Selection.Address</p>
<p>  Set varInput = _<br />
    Application.InputBox(prompt:= _<br />
    &#8220;Select Range of Numbers to be rounded &#8220;, _<br />
    Default:=strOriginalAddress, Type:=8)</p>
<p>  &#8216;get how many cells have been selected and location<br />
  strvarInputAddress = varInput.Address</p>
<p>  &#8216;check to see if any cells have been selected<br />
  If varInput.Count = 0 Then<br />
    MsgBox &#8220;Nothing Selected&#8230;&#8221; &amp; vbCr &amp; vbCr &amp; _<br />
      &#8220;Rounding procedure discontinued&#8230;&#8221;, _<br />
      vbExclamation + vbOKOnly, &#8220;Warning&#8230;&#8221;<br />
    GoTo exit_Sub<br />
  End If</p>
<p>  &#8216;ask for rounding precision<br />
  varRounding = _<br />
    Application.InputBox(prompt:= _<br />
    &#8220;Enter Number of places for cells to be rounded &#8220;, _<br />
    Default:=2, Type:=1)</p>
<p>  &#8216;check to see if a number was entered for rounding precision<br />
  If Asc(varRounding) &lt;&gt; 48 Then<br />
    If Len(varRounding) = 0 Or varRounding &gt; 100 _<br />
      Or varRounding = False Then<br />
      MsgBox &#8220;Rounding Amount Problem Encountered&#8230;&#8221; &amp; _<br />
        vbCr &amp; vbCr &amp; _<br />
        &#8220;Rounding procedure discontinued&#8230;&#8221;, _<br />
        vbExclamation + vbOKOnly, &#8220;Warning&#8230;&#8221;<br />
      GoTo exit_Sub<br />
    End If<br />
  End If</p>
<p>  &#8216;only look in used area of the worksheet<br />
  Set varInput = Intersect(varInput.Parent.UsedRange, varInput)</p>
<p>  &#8216;create round formula<br />
  Application.Calculation = xlManual<br />
  For Each objCell In varInput</p>
<p>    &#8216;check if cell is a value<br />
    Select Case UCase(TypeName(objCell.value))<br />
      Case &#8220;BYTE&#8221;<br />
        blnNumber = True<br />
      Case &#8220;CURRENCY&#8221;<br />
        blnNumber = True<br />
      Case &#8220;DECIMAL&#8221;<br />
        blnNumber = True<br />
      Case &#8220;DOUBLE&#8221;<br />
        blnNumber = True<br />
      Case &#8220;INTEGER&#8221;<br />
        blnNumber = True<br />
      Case &#8220;LONG&#8221;<br />
        blnNumber = True<br />
      Case &#8220;SINGLE&#8221;<br />
        blnNumber = True<br />
      Case Else<br />
        blnNumber = False<br />
    End Select</p>
<p>    &#8216;if cell is a value in the used area, continue<br />
    If blnNumber = True Then<br />
      Select Case Asc(Left(objCell.Formula, 1))<br />
        Case 45      &#8216;minus (-) sign<br />
          objCell.Formula = _<br />
            &#8220;=ROUND(&#8221; &amp; _<br />
            objCell.Formula &amp; &#8220;,&#8221; &amp; varRounding &amp; &#8220;)&#8221;<br />
        Case 48 To 57 &#8216;numbers 0 thru 9<br />
          objCell.Formula = _<br />
            &#8220;=ROUND(&#8221; &amp; _<br />
            objCell.Formula &amp; &#8220;,&#8221; &amp; varRounding &amp; &#8220;)&#8221;<br />
        Case 61      &#8216;equal (=) sign<br />
          objCell.Formula = _<br />
            &#8220;=ROUND(&#8221; &amp; _<br />
            Right(objCell.Formula, _<br />
            Len(objCell.Formula) &#8211; 1) &amp; _<br />
            &#8220;,&#8221; &amp; varRounding &amp; &#8220;)&#8221;<br />
      End Select<br />
    End If</p>
<p>  Next objCell</p>
<p>exit_Sub:<br />
  Set varInput = Nothing</p>
<p>  &#8216;re-set to original calculation method<br />
  Select Case strOrigCalcStatus<br />
    Case &#8220;Automatic&#8221;<br />
      Application.Calculation = xlCalculationAutomatic<br />
    Case &#8220;Manual&#8221;<br />
      Application.Calculation = xlCalculationManual<br />
    Case &#8220;SemiAutomatic&#8221;<br />
      Application.Calculation = xlCalculationSemiautomatic<br />
    Case Else<br />
      Application.Calculation = xlCalculationAutomatic<br />
  End Select</p>
<p>  Exit Sub</p>
<p>err_Sub:<br />
  MsgBox &#8220;Error encountered&#8230;&#8221; &amp; _<br />
    vbCr &amp; vbCr &amp; _<br />
    &#8220;Rounding procedure discontinued&#8230;&#8221;, _<br />
    vbExclamation + vbOKOnly, &#8220;Warning&#8230;&#8221;<br />
  GoTo exit_Sub</p>
<p>End Sub<br />
&#8216;/========================/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ross</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/11/precision/#comment-2142</link>
		<dc:creator>Ross</dc:creator>
		<pubDate>Thu, 12 Aug 2004 15:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=714#comment-2142</guid>
		<description>&lt;p&gt;Rounding errors are prevalent in most SS. I&#039;m sure I&#039;m not telling you guys anything you donít know already, but it&#039;s a problem of number function - I think that like you say, to be as accurate and precise you have to design your SS well, rounding where Nescafe (sorry necessary), but you can never really remove the errors.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Rounding errors are prevalent in most SS. I&#8217;m sure I&#8217;m not telling you guys anything you donít know already, but it&#8217;s a problem of number function &#8211; I think that like you say, to be as accurate and precise you have to design your SS well, rounding where Nescafe (sorry necessary), but you can never really remove the errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/11/precision/#comment-2141</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Thu, 12 Aug 2004 14:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=714#comment-2141</guid>
		<description>&lt;p&gt;I&#039;m with you, Dick.  I don&#039;t feel comfortable having Excel change stuff like that, especially if you decide 30 minutes later that you don&#039;t actually WANT it formatted that way.  &lt;/p&gt;
&lt;p&gt;I use the ROUND() function extensively for that reason.  I don&#039;t always round to the same number of decimals, either; I use 0, 2 and 4 decimals pretty equally.  I got sick of adding the function by hand, so I wrote some code that would do it for me in a snap.  I&#039;m posting it below:&lt;/p&gt;
&lt;p&gt;Sub rounder(arg As Integer)&lt;br&gt;
    Dim cell As Range&lt;br&gt;
    Dim short_form As String, long_form As String&lt;br&gt;
    On Error GoTo Error&lt;br&gt;
    For Each cell In Selection&lt;br&gt;
        If cell.Formula &lt;&gt; &quot;&quot; Then&lt;br&gt;
            If (Left(cell.Formula, 1)) = &quot;=&quot; Then&lt;br&gt;
                If (Mid(cell.Formula, 2, 5)) = &quot;ROUND&quot; Then&lt;br&gt;
                    short_form = Mid(cell.Formula, 8, Len(cell.Formula) - 10)&lt;br&gt;
                Else&lt;br&gt;
                    short_form = Right(cell.Formula, (Len(cell.Formula) - 1))&lt;br&gt;
                End If&lt;br&gt;
            Else&lt;br&gt;
                short_form = cell.Formula&lt;br&gt;
            End If&lt;br&gt;
            long_form = &quot;=round(&quot; &amp; short_form &amp; &quot;,&quot; &amp; arg &amp; &quot;)&quot;&lt;br&gt;
            cell.Formula = long_form&lt;br&gt;
        End If&lt;br&gt;
    Next&lt;br&gt;
    Exit Sub&lt;br&gt;
Error:&lt;br&gt;
    Exit Sub&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;It&#039;s called using these bits of code (which I call from a custom toolbar I created):&lt;/p&gt;
&lt;p&gt;Sub round4()&lt;br&gt;
    Call rounder(4)&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;Sub round2()&lt;br&gt;
    Call rounder(2)&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;Sub round0()&lt;br&gt;
    Call rounder(0)&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;And if I want to remove the rounding feature, I have this code:&lt;/p&gt;
&lt;p&gt;Sub remove_round()&lt;br&gt;
    Dim cell As Range&lt;br&gt;
    Dim short_form As String, long_form As String&lt;br&gt;
    On Error GoTo Error&lt;br&gt;
    For Each cell In Selection&lt;br&gt;
        If cell.Formula &lt;&gt; &quot;&quot; Then&lt;br&gt;
            If (Left(cell.Formula, 1)) = &quot;=&quot; Then&lt;br&gt;
                If (Mid(cell.Formula, 2, 5)) = &quot;ROUND&quot; Then&lt;br&gt;
                    short_form = Mid(cell.Formula, 8, Len(cell.Formula) - 10)&lt;br&gt;
                    long_form = &quot;=&quot; &amp; short_form&lt;br&gt;
                    cell.Formula = long_form&lt;br&gt;
                End If&lt;br&gt;
            End If&lt;br&gt;
        End If&lt;br&gt;
    Next&lt;br&gt;
    Exit Sub&lt;br&gt;
Error:&lt;br&gt;
    Exit Sub&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;I&#039;m not sure if this is good code, but it saves me time every day.  Time that can be better spent perusing the goldmine that is DDOE!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;m with you, Dick.  I don&#8217;t feel comfortable having Excel change stuff like that, especially if you decide 30 minutes later that you don&#8217;t actually WANT it formatted that way.  </p>
<p>I use the ROUND() function extensively for that reason.  I don&#8217;t always round to the same number of decimals, either; I use 0, 2 and 4 decimals pretty equally.  I got sick of adding the function by hand, so I wrote some code that would do it for me in a snap.  I&#8217;m posting it below:</p>
<p>Sub rounder(arg As Integer)<br />
    Dim cell As Range<br />
    Dim short_form As String, long_form As String<br />
    On Error GoTo Error<br />
    For Each cell In Selection<br />
        If cell.Formula &lt;&gt; &#8220;&#8221; Then<br />
            If (Left(cell.Formula, 1)) = &#8220;=&#8221; Then<br />
                If (Mid(cell.Formula, 2, 5)) = &#8220;ROUND&#8221; Then<br />
                    short_form = Mid(cell.Formula, 8, Len(cell.Formula) &#8211; 10)<br />
                Else<br />
                    short_form = Right(cell.Formula, (Len(cell.Formula) &#8211; 1))<br />
                End If<br />
            Else<br />
                short_form = cell.Formula<br />
            End If<br />
            long_form = &#8220;=round(&#8221; &amp; short_form &amp; &#8220;,&#8221; &amp; arg &amp; &#8220;)&#8221;<br />
            cell.Formula = long_form<br />
        End If<br />
    Next<br />
    Exit Sub<br />
Error:<br />
    Exit Sub<br />
End Sub</p>
<p>It&#8217;s called using these bits of code (which I call from a custom toolbar I created):</p>
<p>Sub round4()<br />
    Call rounder(4)<br />
End Sub</p>
<p>Sub round2()<br />
    Call rounder(2)<br />
End Sub</p>
<p>Sub round0()<br />
    Call rounder(0)<br />
End Sub</p>
<p>And if I want to remove the rounding feature, I have this code:</p>
<p>Sub remove_round()<br />
    Dim cell As Range<br />
    Dim short_form As String, long_form As String<br />
    On Error GoTo Error<br />
    For Each cell In Selection<br />
        If cell.Formula &lt;&gt; &#8220;&#8221; Then<br />
            If (Left(cell.Formula, 1)) = &#8220;=&#8221; Then<br />
                If (Mid(cell.Formula, 2, 5)) = &#8220;ROUND&#8221; Then<br />
                    short_form = Mid(cell.Formula, 8, Len(cell.Formula) &#8211; 10)<br />
                    long_form = &#8220;=&#8221; &amp; short_form<br />
                    cell.Formula = long_form<br />
                End If<br />
            End If<br />
        End If<br />
    Next<br />
    Exit Sub<br />
Error:<br />
    Exit Sub<br />
End Sub</p>
<p>I&#8217;m not sure if this is good code, but it saves me time every day.  Time that can be better spent perusing the goldmine that is DDOE!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

