<?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>Roger Cuddy &#187; Excel</title>
	<atom:link href="http://www.rogercuddy.com/tag/excel/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rogercuddy.com</link>
	<description>This site holds copies of whatever I&#039;ve posted around the net. YMMV</description>
	<lastBuildDate>Sat, 03 Jul 2010 17:04:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Calculating weighted averages in Excel</title>
		<link>http://www.rogercuddy.com/general/calculating-weighted-averages-in-excel/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.rogercuddy.com/general/calculating-weighted-averages-in-excel/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 23:50:19 +0000</pubDate>
		<dc:creator>Roger Cuddy</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Stocks]]></category>
		<category><![CDATA[Weighted Average]]></category>

		<guid isPermaLink="false">http://www.rogercuddy.com/calculating-weighted-averages-in-excel-16.htm</guid>
		<description><![CDATA[Excel does not provide a weighted mean function but it's easy to do weighted averages using the sumproduct function.]]></description>
			<content:encoded><![CDATA[<img style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=4f56e4f86bf509535a047def1525d6f0&amp;default=http://use.perl.org/images/pix.gif' alt='No Gravatar' width=40 height=40/><p>The question of how to get a weighted average or weighted mean in Excel arises frequently among new investors. This is largely due to the importance of weighted averages in answering many of the new investor&#8217;s questions such as the overall yield of a portfolio.</p>
<p>The investor will of course turn to his most handy and reliable tool in analyzing his portfolio namely Excel. Upon discovering that there is not a single function to calculate the value needed, many end up taking a circuitous route to arrive at the answer needed. While Excel does not have a weighted average function per se it does indeed have the components needed to render the process quite simple.&#160; Below we will walk through the process step by step. I often find when searching for simpler methods of accomplishing tasks that it is helpful to start with an answer derived the long way and then that answer can be used to prove out the new method. I will proceed in that manner here by first providing an example with long hand solution and then demonstrating how to simplify the steps via Excel.</p>
<p> <span id="more-16"></span><br />
<table cellspacing="0" cellpadding="2" width="735" border="0">
<tbody>
<tr>
<td valign="top" width="427">A weighted average is the sum of the products of the weights and values and then that sum is divided by the sum of the weights. Since it is so difficult to express even simple mathematical expressions in words it is better to reference the general form of the calculation. </td>
<td valign="top" width="306"><a href="http://www.rogercuddy.com/wp-content/uploads/2009/02/image.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="75" alt="image" src="http://www.rogercuddy.com/wp-content/uploads/2009/02/image-thumb.png" width="165" border="0" /></a>           <br />General form</td>
</tr>
<tr>
<td valign="top" width="427">The presence of the summation symbol has been known to cause anxiety to some so let&#8217;s rewrite it as here which is the same thing.</td>
<td valign="top" width="306"><a href="http://www.rogercuddy.com/wp-content/uploads/2009/02/image1.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="38" alt="image" src="http://www.rogercuddy.com/wp-content/uploads/2009/02/image-thumb1.png" width="244" border="0" /></a></td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<table cellspacing="0" cellpadding="2" width="742" border="0">
<tbody>
<tr>
<td valign="top" width="375">Now that it&#8217;s established no math beyond multiplication and division is needed we shall proceed with an example. Consider a simple portfolio comprised of 3 stocks that have the market value and current yields show in the following table. The yield for the portfolio as a whole may be derived by using the weighted average of the yields.</td>
<td valign="top" width="365">
<table cellspacing="0" cellpadding="2" width="400" border="1">
<tbody>
<tr>
<td valign="top" width="133">Stock</td>
<td valign="top" width="133">Market Value ($)</td>
<td valign="top" width="133">Current Yield (%)</td>
</tr>
<tr>
<td valign="top" width="133">A</td>
<td valign="top" width="133">100</td>
<td valign="top" width="133">4.0</td>
</tr>
<tr>
<td valign="top" width="133">B</td>
<td valign="top" width="133">50</td>
<td valign="top" width="133">3.5</td>
</tr>
<tr>
<td valign="top" width="133">C</td>
<td valign="top" width="133">100</td>
<td valign="top" width="133">2.0</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" width="375">Substituting the example values into the formula gives the image to the right and solving the math results in a value of 3.1 percent yield.</td>
<td valign="top" width="365">&#160;<a href="http://www.rogercuddy.com/wp-content/uploads/2009/02/image2.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="39" alt="image" src="http://www.rogercuddy.com/wp-content/uploads/2009/02/image-thumb2.png" width="244" border="0" /></a></td>
</tr>
<tr>
<td valign="top" width="375">&#160;</td>
<td valign="top" width="365">&#160;</td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="2" width="743" border="0">
<tbody>
<tr>
<td valign="top" width="411">To solve the same example in Excel enter the values into a group of cells as shown here.</td>
<td valign="top" width="330"><a href="http://www.rogercuddy.com/wp-content/uploads/2009/02/image3.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="120" alt="image" src="http://www.rogercuddy.com/wp-content/uploads/2009/02/image-thumb3.png" width="244" border="0" /></a></td>
</tr>
<tr>
<td valign="top" width="411">Excel provides the SumProduct function which will be used to take the sums of the products of market value and current yield. This solves the top line of our formula. Note the arguments to the function will be 2 seperate arrays and not one. Observe the next image </td>
<td valign="top" width="330"><a href="http://www.rogercuddy.com/wp-content/uploads/2009/02/image4.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="203" alt="image" src="http://www.rogercuddy.com/wp-content/uploads/2009/02/image-thumb4.png" width="469" border="0" /></a></td>
</tr>
<tr>
<td valign="top" width="411">As previously stated the sum product of the two rows gives us the top line of the equation and all that remains is to divide by the sum of the weights. In this case the sum of the market values. The total formula then becomes =sumproduct(b2:b4,c2:c4)/sum(b2:b4) as in image to right. </td>
<td valign="top" width="330"><a href="http://www.rogercuddy.com/wp-content/uploads/2009/02/image5.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="231" alt="image" src="http://www.rogercuddy.com/wp-content/uploads/2009/02/image-thumb5.png" width="513" border="0" /></a></td>
</tr>
</tbody>
</table>
<p>&#160;</p>
</p>
<p>Hit enter and note that value 3.1 is the result.</p>
<p>That&#8217;s it, all there is to doing a weighted average in Excel. Just take the sumproduct of the weights and values and divide by the sum of the weights. While this example is incredibly simple there isn&#8217;t much to add to it other than just increasing the number of values being used which is meaningless in terms of how to solve. Enjoy.</p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:0bfc2463-5ac4-477a-965f-1c4cddc820d8" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Excel"  rel="tag">Excel</a>,<a href="http://technorati.com/tags/Weighted+Average"  rel="tag">Weighted Average</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.rogercuddy.com/general/calculating-weighted-averages-in-excel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
