<?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: Inventory Freight Calculation</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2009/04/17/inventory-freight-calculation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2009/04/17/inventory-freight-calculation/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 23:42:03 +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</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/04/17/inventory-freight-calculation/#comment-43736</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Sat, 06 Feb 2010 04:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2350#comment-43736</guid>
		<description>&lt;p&gt;This is very handy , I plan to utilise in my excel planning for freight Cheers Simon Australia&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This is very handy , I plan to utilise in my excel planning for freight Cheers Simon Australia</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Brown</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/04/17/inventory-freight-calculation/#comment-41874</link>
		<dc:creator>Ian Brown</dc:creator>
		<pubDate>Wed, 28 Oct 2009 18:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2350#comment-41874</guid>
		<description>&lt;p&gt;Unfortunately the formulae given can result in rounding errors.  Consider 3 line items each for 100 and freight of 10. A formula of C3 =IF(ISBLANK(B4),0,ROUND(Freight*(SUM($B$3:B3)/SUM(LineItems)),2)-SUM($C$2:C2)) will return freight amounts of 3.33, 3.34 and 3.33.  Arbitrary, but everything balances!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Unfortunately the formulae given can result in rounding errors.  Consider 3 line items each for 100 and freight of 10. A formula of C3 =IF(ISBLANK(B4),0,ROUND(Freight*(SUM($B$3:B3)/SUM(LineItems)),2)-SUM($C$2:C2)) will return freight amounts of 3.33, 3.34 and 3.33.  Arbitrary, but everything balances!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Hollinger</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/04/17/inventory-freight-calculation/#comment-39016</link>
		<dc:creator>Paul Hollinger</dc:creator>
		<pubDate>Sat, 18 Apr 2009 13:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2350#comment-39016</guid>
		<description>&lt;p&gt;I do this kind of allocation often enough and in enough varied situations that I&#039;ve added an array function to my addins to do it.  That lets me select the output range and type a single formula directly into whatever sheet I&#039;m working on.  In many cases I&#039;ll immediately copy and paste values to eliminate the formula.  In your application, you&#039;d still need to add the distributed freight to the line items (or modify the function to do it).&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;Public&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; Dist(dTotal &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Double&lt;/span&gt;, baseDist &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Variant&lt;/span&gt;, &lt;span class=&quot;kw1&quot;&gt;Optional&lt;/span&gt; rDigits &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Integer&lt;/span&gt; = 2) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Variant&lt;/span&gt;&lt;br&gt;
&lt;span class=&quot;co1&quot;&gt;&#039; Array function, select destination range first, end with Ctrl-Shft-Enter&lt;br&gt;
&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;&#039; Distributes 1st argument (scalar) like 2nd argument (column range) into&lt;br&gt;
&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;&#039; selected column range, rounding to rDigits digits.&lt;br&gt;
&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; baseArray &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Variant&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; dRatio &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Double&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; i &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&#160; &#160; baseArray = Application.Transpose(baseDist)&lt;br&gt;
&#160; &#160; dRatio = dTotal / Application.Sum(baseArray)&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; i = 1 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;UBound&lt;/span&gt;(baseArray)&lt;br&gt;
&#160; &#160; &#160; &#160; baseArray(i) = round(baseArray(i) * dRatio, rDigits)&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; i&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; Dist = Application.Transpose(baseArray)&lt;br&gt;
&#160; &#160; &lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>I do this kind of allocation often enough and in enough varied situations that I&#8217;ve added an array function to my addins to do it.  That lets me select the output range and type a single formula directly into whatever sheet I&#8217;m working on.  In many cases I&#8217;ll immediately copy and paste values to eliminate the formula.  In your application, you&#8217;d still need to add the distributed freight to the line items (or modify the function to do it).</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Public</span> <span class="kw1">Function</span> Dist(dTotal <span class="kw1">As</span> <span class="kw1">Double</span>, baseDist <span class="kw1">As</span> <span class="kw1">Variant</span>, <span class="kw1">Optional</span> rDigits <span class="kw1">As</span> <span class="kw1">Integer</span> = 2) <span class="kw1">As</span> <span class="kw1">Variant</span><br />
<span class="co1">&#8216; Array function, select destination range first, end with Ctrl-Shft-Enter<br />
</span><span class="co1">&#8216; Distributes 1st argument (scalar) like 2nd argument (column range) into<br />
</span><span class="co1">&#8216; selected column range, rounding to rDigits digits.<br />
</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> baseArray <span class="kw1">As</span> <span class="kw1">Variant</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> dRatio <span class="kw1">As</span> <span class="kw1">Double</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> i <span class="kw1">As</span> <span class="kw1">Long</span></p>
<p>&nbsp; &nbsp; baseArray = Application.Transpose(baseDist)<br />
&nbsp; &nbsp; dRatio = dTotal / Application.Sum(baseArray)<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">For</span> i = 1 <span class="kw1">To</span> <span class="kw1">UBound</span>(baseArray)<br />
&nbsp; &nbsp; &nbsp; &nbsp; baseArray(i) = round(baseArray(i) * dRatio, rDigits)<br />
&nbsp; &nbsp; <span class="kw1">Next</span> i<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Dist = Application.Transpose(baseArray)<br />
&nbsp; &nbsp; <br />
<span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: DaveP</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/04/17/inventory-freight-calculation/#comment-39014</link>
		<dc:creator>DaveP</dc:creator>
		<pubDate>Sat, 18 Apr 2009 02:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2350#comment-39014</guid>
		<description>&lt;p&gt;Alternatives&lt;br&gt;
a)&lt;br&gt;
C3 =(B4&gt;0)*(LOOKUP(BigNum,$B:$B)/(SUM(B:B)-LOOKUP(BigNum,$B:$B))*B3)&lt;/p&gt;
&lt;p&gt;or with a Named Range &quot;Freight&quot;  =LOOKUP(BigNum,Sheet1!$B:$B)&lt;/p&gt;
&lt;p&gt;C3 =Freight/(SUM(B:B)-Freight)*B3&lt;/p&gt;
&lt;p&gt;b)&lt;br&gt;
The Freight Column is not required:&lt;/p&gt;
&lt;p&gt;      Without separating the freight the formula is &lt;/p&gt;
&lt;p&gt;      =(B4&gt;0)*(1+Freight/(SUM(B:B)-Freight))*B3&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Alternatives<br />
a)<br />
C3 =(B4&gt;0)*(LOOKUP(BigNum,$B:$B)/(SUM(B:B)-LOOKUP(BigNum,$B:$B))*B3)</p>
<p>or with a Named Range &#8220;Freight&#8221;  =LOOKUP(BigNum,Sheet1!$B:$B)</p>
<p>C3 =Freight/(SUM(B:B)-Freight)*B3</p>
<p>b)<br />
The Freight Column is not required:</p>
<p>      Without separating the freight the formula is </p>
<p>      =(B4&gt;0)*(1+Freight/(SUM(B:B)-Freight))*B3</p>
]]></content:encoded>
	</item>
</channel>
</rss>

