﻿<?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: Five Excel Formulas to make you cringe</title>
	<atom:link href="http://www.fimodo.com/2009/10/five-excel-formulas-to-make-you-cringe/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fimodo.com/2009/10/five-excel-formulas-to-make-you-cringe/</link>
	<description>Financial Modelling Experts sharing their knowledge</description>
	<lastBuildDate>Wed, 08 Sep 2010 11:57:06 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nick Crawley</title>
		<link>http://www.fimodo.com/2009/10/five-excel-formulas-to-make-you-cringe/comment-page-1/#comment-92</link>
		<dc:creator>Nick Crawley</dc:creator>
		<pubDate>Wed, 21 Oct 2009 21:22:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.fimodo.com/?p=534#comment-92</guid>
		<description>Some good points here made Jon. At the risk of starting a never ending loop (!) I might suggest a couple of points that I take into account when managing the models we produce (daily) in the world of Project Finance.

1. Computational Efficiency
This used to be a primary factor, driving formula and model structure. Although still a consideration, desktop computing has far exceeded the current requirements of a typical project finance model. The number of models taking an hour to &#039;calculate&#039; in the market these days is very small. Even our largest and most complex models take less than 5 seconds to calculate - and that&#039;s a long time. Accordingly, I drive our companies development philosophy to be more aligned with whatever makes it easier for the user/auditor to understand rather than speed of calculation. I started modelling on Quattro and SuperCalc5 so have been through the pain of slow models.

2. Formula Length
For me sophistication is a definite plus if it makes it easier and quicker for the user/auditor, for example SUMPRODUCT() rather than building up A.B+C.D+E.F is arguably better but if it was just A.B+C.D this might not be the case. 
&lt;!--more--&gt;
Warning, the following may make you cringe..., we have a rule at Navigator which is &#039;the rule of thumb&#039;:

&quot;if the formula is longer than your thumb when held up to the formula bar, its too long, use another line&quot;. 

..of course from time to time a rule such as this gets breached but if it is generally followed you end up with the model being composed of lines that a user/auditor can generally understand and check in their heads - financial modelling does not need to be any more complicated than this in my view (for 99.9% of the time, the other .1% requires a rocket scientist!)

Your LOOKUP is a perfect example of this, the vast majority of users would not understand { } and models are built for the user to be able to use and understand.

&quot;Doesn&#039;t this mean we use lots of rows?&quot;
Yes it does but in our philosophy lines are &#039;free&#039; but formula length and complexity is very &#039;expensive&#039;

..the cost of many lines can be managed with good layout, headers and data grouping. Complexity has no solution and a high cost (lack of transparency, higher error rate, time needed to explain it..etc) 

No direct conclusion but wanted to share with you that the shortest calculation isn&#039;t by definition the best, within the constraints of our market anyway, the market where the builder is never the only &#039;user&#039; and the cost of an audit is watched very closely.</description>
		<content:encoded><![CDATA[<p>Some good points here made Jon. At the risk of starting a never ending loop (!) I might suggest a couple of points that I take into account when managing the models we produce (daily) in the world of Project Finance.</p>
<p>1. Computational Efficiency<br />
This used to be a primary factor, driving formula and model structure. Although still a consideration, desktop computing has far exceeded the current requirements of a typical project finance model. The number of models taking an hour to &#8216;calculate&#8217; in the market these days is very small. Even our largest and most complex models take less than 5 seconds to calculate &#8211; and that&#8217;s a long time. Accordingly, I drive our companies development philosophy to be more aligned with whatever makes it easier for the user/auditor to understand rather than speed of calculation. I started modelling on Quattro and SuperCalc5 so have been through the pain of slow models.</p>
<p>2. Formula Length<br />
For me sophistication is a definite plus if it makes it easier and quicker for the user/auditor, for example SUMPRODUCT() rather than building up A.B+C.D+E.F is arguably better but if it was just A.B+C.D this might not be the case.<br />
<!--more--><br />
Warning, the following may make you cringe&#8230;, we have a rule at Navigator which is &#8216;the rule of thumb&#8217;:</p>
<p>&#8220;if the formula is longer than your thumb when held up to the formula bar, its too long, use another line&#8221;. </p>
<p>..of course from time to time a rule such as this gets breached but if it is generally followed you end up with the model being composed of lines that a user/auditor can generally understand and check in their heads &#8211; financial modelling does not need to be any more complicated than this in my view (for 99.9% of the time, the other .1% requires a rocket scientist!)</p>
<p>Your LOOKUP is a perfect example of this, the vast majority of users would not understand { } and models are built for the user to be able to use and understand.</p>
<p>&#8220;Doesn&#8217;t this mean we use lots of rows?&#8221;<br />
Yes it does but in our philosophy lines are &#8216;free&#8217; but formula length and complexity is very &#8216;expensive&#8217;</p>
<p>..the cost of many lines can be managed with good layout, headers and data grouping. Complexity has no solution and a high cost (lack of transparency, higher error rate, time needed to explain it..etc) </p>
<p>No direct conclusion but wanted to share with you that the shortest calculation isn&#8217;t by definition the best, within the constraints of our market anyway, the market where the builder is never the only &#8216;user&#8217; and the cost of an audit is watched very closely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon von der Heyden</title>
		<link>http://www.fimodo.com/2009/10/five-excel-formulas-to-make-you-cringe/comment-page-1/#comment-91</link>
		<dc:creator>Jon von der Heyden</dc:creator>
		<pubDate>Wed, 21 Oct 2009 14:09:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.fimodo.com/?p=534#comment-91</guid>
		<description>I agree in many respects.  However, your comment:
“As simple as possible and as complex as necessary”

I like this comment but one major factor when determining the most appropriate method is to understand how excel evaluates each method.  For me the best method is the one that will operate most efficiently.  Take volatile worksheet functions for instance.  I frequently revert to what seems to be a more complex method but I have chosen to do so because I am determined to avoid volatile functions unless absolutely necessary!  See this article to understand what a volatile function is and why they are best avoided: http://www.decisionmodels.com/calcsecretsi.htm

Further, it is worth noting how Excel will treat a sum function and how it will treat cells added using the + method.  The SUM method will ignore text values whilst adding a text value with a numeric number will yield a #VALUE! error.  This suggests that SUM should almost always be the preferred method.  For instance, lets say I want to add A1 with A3.  Most will use =A1+A3.  I would rather opt for =SUM(A1,A3) because if either of the references houses a text value it will be ignored in the evaluation (treated as zero value).  Just thought I would add this to support your recommendation.

With respect to the size (length) of a formula:  I agree that a formula should be as short as possible but the decision to use a shorter method should not be driven by the desire to produce shorter formulae.   Again I want to choose the most efficient method and if this means choosing a formula that will involve more characters then so be it.  We need to appropriately name formulae where they may be used repeatedly and include in your model a list of all names, what they refer to and a brief description of each.  This makes complex formulae more auditable.  We can also use carriage return in our formulae to break it into steps to make it easier to follow, something I do regularly if I feel that my formula is becoming too long and quite complex.

As for creating a list of names in a workbook, it involves very simple VBA.  The following in a standard module or run from the immediate window:

ActiveSheet.Range(&quot;A1&quot;).ListNames

This one-liner will populate a list of all names in your workbook and their references.  The list will be provided in the Active Sheet in columns A &amp; B.  Then all you need to do is provide a description of each.

I like your comment about using too many IF functions in a formula.  There is very often a shorter and more efficient alternative.   And where there is not we also need to consider how a stepped approach might make our models easier to follow.  A steppped approach doesn&#039;t necessarily have to compromise the efficiency of the model.

An illustration of an unnecessary complex IF formula, and one that I frequently encounter, would be to return a value category for a given cell value:

=IF(A1&gt;100,&quot;101+&quot;,IF(A1&gt;75,&quot;76-100&quot;,IF(A1&gt;50,&quot;51-75&quot;,IF(A1&gt;25,&quot;26-50&quot;,&quot;0-25&quot;))))

which could be substituted with a lookup:

=LOOKUP(A1,{0,&quot;0-25&quot;;26,&quot;26-50&quot;;51,&quot;51-75&quot;;76,&quot;76-100&quot;;101,&quot;101+&quot;})

And although I have used an inline array in the LOOKUP one should really look to occupying a table instead which will make it easier to update/maintain, and make the formula considerably shorter.

With respects to using constants within formulae:  I completely agree!  If you need to refer to a constant then stick it in a name that can easily be updated and flow through all of the dependent formula.  For instance, VAT 17.5% is fine to house in either a cell or a name, but should never be used as a constant in a formula!   Good point!</description>
		<content:encoded><![CDATA[<p>I agree in many respects.  However, your comment:<br />
“As simple as possible and as complex as necessary”</p>
<p>I like this comment but one major factor when determining the most appropriate method is to understand how excel evaluates each method.  For me the best method is the one that will operate most efficiently.  Take volatile worksheet functions for instance.  I frequently revert to what seems to be a more complex method but I have chosen to do so because I am determined to avoid volatile functions unless absolutely necessary!  See this article to understand what a volatile function is and why they are best avoided: <a href="http://www.decisionmodels.com/calcsecretsi.htm" rel="nofollow">http://www.decisionmodels.com/calcsecretsi.htm</a></p>
<p>Further, it is worth noting how Excel will treat a sum function and how it will treat cells added using the + method.  The SUM method will ignore text values whilst adding a text value with a numeric number will yield a #VALUE! error.  This suggests that SUM should almost always be the preferred method.  For instance, lets say I want to add A1 with A3.  Most will use =A1+A3.  I would rather opt for =SUM(A1,A3) because if either of the references houses a text value it will be ignored in the evaluation (treated as zero value).  Just thought I would add this to support your recommendation.</p>
<p>With respect to the size (length) of a formula:  I agree that a formula should be as short as possible but the decision to use a shorter method should not be driven by the desire to produce shorter formulae.   Again I want to choose the most efficient method and if this means choosing a formula that will involve more characters then so be it.  We need to appropriately name formulae where they may be used repeatedly and include in your model a list of all names, what they refer to and a brief description of each.  This makes complex formulae more auditable.  We can also use carriage return in our formulae to break it into steps to make it easier to follow, something I do regularly if I feel that my formula is becoming too long and quite complex.</p>
<p>As for creating a list of names in a workbook, it involves very simple VBA.  The following in a standard module or run from the immediate window:</p>
<p>ActiveSheet.Range(&#8221;A1&#8243;).ListNames</p>
<p>This one-liner will populate a list of all names in your workbook and their references.  The list will be provided in the Active Sheet in columns A &amp; B.  Then all you need to do is provide a description of each.</p>
<p>I like your comment about using too many IF functions in a formula.  There is very often a shorter and more efficient alternative.   And where there is not we also need to consider how a stepped approach might make our models easier to follow.  A steppped approach doesn&#8217;t necessarily have to compromise the efficiency of the model.</p>
<p>An illustration of an unnecessary complex IF formula, and one that I frequently encounter, would be to return a value category for a given cell value:</p>
<p>=IF(A1&gt;100,&#8221;101+&#8221;,IF(A1&gt;75,&#8221;76-100&#8243;,IF(A1&gt;50,&#8221;51-75&#8243;,IF(A1&gt;25,&#8221;26-50&#8243;,&#8221;0-25&#8243;))))</p>
<p>which could be substituted with a lookup:</p>
<p>=LOOKUP(A1,{0,&#8221;0-25&#8243;;26,&#8221;26-50&#8243;;51,&#8221;51-75&#8243;;76,&#8221;76-100&#8243;;101,&#8221;101+&#8221;})</p>
<p>And although I have used an inline array in the LOOKUP one should really look to occupying a table instead which will make it easier to update/maintain, and make the formula considerably shorter.</p>
<p>With respects to using constants within formulae:  I completely agree!  If you need to refer to a constant then stick it in a name that can easily be updated and flow through all of the dependent formula.  For instance, VAT 17.5% is fine to house in either a cell or a name, but should never be used as a constant in a formula!   Good point!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Crawley</title>
		<link>http://www.fimodo.com/2009/10/five-excel-formulas-to-make-you-cringe/comment-page-1/#comment-75</link>
		<dc:creator>Nick Crawley</dc:creator>
		<pubDate>Mon, 19 Oct 2009 06:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.fimodo.com/?p=534#comment-75</guid>
		<description>Hi Danielle,

We clearly live in the same world and could agree and agree and agree with all of your comments and I am sure you could have gone on some! 

I would add that the breach of the concept behind point 2 is in my view the fundamental difference between a &#039;decision support model&#039; (of any system not just $&#039;s) and a &#039;spreadsheet&#039;. 

On the flip side, I might take point 3 one step further and suggest:

1. SUM(values) / COUNT() or 
2. SUM(values) / Sum(1,0 inclusion counter) - my preferred.

This might sound pedantic until your models are translated and used in different languages where certain functions although technically translated do not always work as well as you plan - especially at the eleventh hour!</description>
		<content:encoded><![CDATA[<p>Hi Danielle,</p>
<p>We clearly live in the same world and could agree and agree and agree with all of your comments and I am sure you could have gone on some! </p>
<p>I would add that the breach of the concept behind point 2 is in my view the fundamental difference between a &#8216;decision support model&#8217; (of any system not just $&#8217;s) and a &#8217;spreadsheet&#8217;. </p>
<p>On the flip side, I might take point 3 one step further and suggest:</p>
<p>1. SUM(values) / COUNT() or<br />
2. SUM(values) / Sum(1,0 inclusion counter) &#8211; my preferred.</p>
<p>This might sound pedantic until your models are translated and used in different languages where certain functions although technically translated do not always work as well as you plan &#8211; especially at the eleventh hour!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
