cima spreadsheet skills

Upload: sampath-karunarathne

Post on 03-Jun-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 CIMA Spreadsheet Skills

    1/18

    11/13 All skills | CIMA Spreadsheet Skills

    1ww.cimaapps.com/spreadsheetskills/?cat=5

    CATEGORY ARCHIVES: ALL SKILLS

    SUMPRODUCT

    Posted on January 8, 2013

    Query

    I have been told by my colleagues that SUMPRODUCT is a very versatile Excel function, but I am not sure I understand its full capabilities. Would

    you mind shedding some light please?

    Advice

    I have mentioned SUMPRODUCT in passing before (for example July 2009s article). However, for the purposes of self-containment, let me recap on

    the basics first.

    It should be noted that all of the examples below are included in the attached Excel file.

    Basic functionality

    At first glance, SUMPRODUCT(vector1,vector2,) appears quite humble. Before showing an example, though, look at t he syntax carefully:

    a vector for Excel purposes is a collection of cells either one column wide or one row deep. For example, A1:A5 is a column vector, A1:E1 is a

    row vector, cell A1 is a unit vector and the range A1:E5 is not a vector (it is actually an array, but more on that later). The ranges must be

    contiguous

    this basic functionality uses the comma delimiter (,) to separate the arguments (vectors). Unlike most Excel functions, it is possible to use

    other delimiters, but this will be revisited shortly below.

    Consider the following sales report:

    Example sales report

    The sales in column H are simply the product of columns F and G, e.g. the formula in cell H12 is simply =F12*G12. Then, to calculate the entire

    amount cell H23 sums column H. This could all be performed much quicker using the following formula:

    =SUMPRODUCT(F12:F21,G12:G21)

    i.e. SUMPRODUCT does exactly what it says on the tin: it sums the individual products.

    Example sales report SUMPRODUCT solution

    CIMA Spreadsheet SkillsBrowse this s ite on your mobile phone or tablet to experience our web app

    http://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2009/Insight-July-2009/Spreadsheet-skills-working-with-multiple-criteria/http://www.cimaapps.com/spreadsheetskills/?p=125http://www.cimaapps.com/spreadsheetskills/http://www.cimaglobal.com/Documents/Insightdocs/oct2012/SP%20-%20Sumproduct%20Examples.xlshttp://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2009/Insight-July-2009/Spreadsheet-skills-working-with-multiple-criteria/http://www.cimaapps.com/spreadsheetskills/?p=125http://www.cimaapps.com/spreadsheetskills/?p=125
  • 8/13/2019 CIMA Spreadsheet Skills

    2/18

    11/13 All skills | CIMA Spreadsheet Skills

    2ww.cimaapps.com/spreadsheetskills/?cat=5

    Dealing with multiple criteria

    Where SUMPRODUCT comes into its own is when dealing with multiple criteria. This is done by considering the properties of TRUE and FALSE in

    Excel, namely:

    TRUE*number = number (e.g. TRUE*7 = 7); and

    FALSE*number = 0 (e.g. FALSE*7=0).

    Consider the following example:

    Example dummy database

    We can t est columns F and G to check whether they equal our required values. SUMPRODUCT could be used as follows to sum only sales made

    by Business Unit 1 for Product Z, viz.

    =SUMPRODUCT((F12:F21=1)*(G12:G21=Z)*H12:H21).

    For the purposes of this calculation, (F12:F21=1) replaces the contents of cells F12:F21 with either TRUE or FALSE depending on whether the value

    contained in each cell equals 1 or not. The brackets are required to force Excel to compute this first before cross-multiplying.

    Similarly, (G12:G21=Z) replaces the contents of cells G12:G21 with either TRUE or FALSE depending on whether the value Z is contained in each

    cell.

    Therefore, the only time cells H12:H21 will be summed is when the corresponding cell in the arrays F12:F21 and G12:G21 are both TRUE, then you

    will get TRUE*TRUE*number, which equals the said number.

    Notice that SUMPRODUCT is not an array formula (i.e. you do not use CTRL+SHIFT+ENTER; please see January 2010s article on arrays), but it is

    an array function, so again it can use a lot of memory making the calculation speed of the file slow down.

    Note also that t his uses the * delimiter rather than the comma, analogous to TRUE*number, etc. If you were to use the comma delimiter ins tead, the

    syntax would have to be modified thus:

    =SUMPRODUCT((F12:F21=1),(G12:G21=Z),H12:H21).

    Minus minus? The first negation in front of the brackets converts the array of TRUEs and FALSEs to numbers, albeit substituting -1 for TRUE and 0

    for FALSE. The second minus sign negates these numbers so that TRUE is effectively 1, rather than -1, whilst FALSE remains equals to zero. This

    variant often confuses end users which is why I recommend the first version described above.

    More ela borate uses

    You can get more and more sophisticated:

    Equality ex ample

    http://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2010/Insight-January-2010/Spreadsheet-skills-boss-can-I-get-arrays/
  • 8/13/2019 CIMA Spreadsheet Skills

    3/18

    11/13 All skills | CIMA Spreadsheet Skills

    3ww.cimaapps.com/spreadsheetskills/?cat=5

    In this scenario, the end user pays invoices only where the invoice number matches the number checked on an authorised list. In the illustration

    above, two invoices (highlighted in red) do not match. SUMPRODUCT can be used to sum the authorised amounts only as follows:

    =SUMPRODUCT((F12:F21=G12:G21)*H12:H21)

    The argument in brackets only gives a value of TRUE for each row when the values in columns F and G are identical.

    Another example includes neither the comma nor the multiplication delimiter:

    Number of unique items

    The formula in cell G29 in this illustration is:

    =SUMPRODUCT((F12:F21")/COUNTIF(F12:F21,F12:F21&"))

    which is so intuitively clear there is no need for an explanation(!)

    Jokes aside, a full explanation can be found in the attached Excel file.

    Comprehensive example

    http://www.cimaglobal.com/Documents/Insightdocs/oct2012/SP%20-%20Sumproduct%20Examples.xls
  • 8/13/2019 CIMA Spreadsheet Skills

    4/18

    11/13 All skills | CIMA Spreadsheet Skills

    4ww.cimaapps.com/spreadsheetskills/?cat=5

    (Click on image to enlarge)

    So far, I have only considered SUMPRODUCT with vector ranges. Using the multiplicat ion delimiter (*), it is possible to use SUMPRODUCT with

    arrays (an array is a range of cells consisting of both more than one row and more than one column).

    In the above example, SUMPRODUCT has been used in its elementary form in cells I36:N36. For example, the formula in cell I36 is:

    =SUMPRODUCT($H$32:$H$35,I$32:I$35)

    and this has then been copied across to the rest of the cells.

    To calculate the total costs of this retail bank example, this could be calculated as:

    =SUMPRODUCT($I$36:$N$36,$I$21:$N$21)

    However, the formula in cell I41 appears more and unnecessarily complicated:

    =SUMPRODUCT($H$32:$H$35*$I$32:$N$35*$I$21:$N$21)

    The use of the multiplication delimiter is deliberate (the formula will not work if the delimiters were to become commas instead). It should be noted

    that this last formula is essentially

    =SUMPRODUCT(Column_Vector*Array*Row_Vector)

    where the number of rows in the Column_Vector must equal the number of rows in the Array, and also the number of columns in the Array must

    equal the number of columns in the Row_Vector.

    The reason for this extended version of the formula is in order to divide the costs between Budget and Standard costs in my example. For example,

    the formula in cell J41 becomes:

    =SUMPRODUCT($H$32:$H$35*$I$32:$N$35*$I$21:$N$21*($G$32:$G$35=J$40))

    ie the formula is now of the form

    =SUMPRODUCT(Column_Vector*Array*Row_Vector*Condition)

    where Condition uses s imilar logic to the TRUE / FALSE examples detailed earlier. This is a powerful concept that can be used to replace

    PivotTables (see May 2009s article), for instance.

    Word to the wise

    There are valid / more efficient alternatives to SUMPRODUCT in some instances. For example, dealing with multiple criteria for vector ranges, the

    SUMIFS function is six times faster, but will only work with Excel 2007 and later versions.

    Over-use of SUMPRODUCT can slow the calculation time down of even the smallest of Excel files. Used sparingly, however, it can be a highly

    versatile addition to the modellers repertoire. It is a sophisticated function, but once you understand how it works, you can start to use

    SUMPRODUCT for a whole array of problems (pun intended!)

    http://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2009/Insight-May-2009/Spreadsheet-skills-the-power-of-pivot-tables/http://www.cimaapps.com/Global/Images/InsightImages/October%202012/SS%20October%202012/Image%206%20-%20comprehensive%20example867.gif
  • 8/13/2019 CIMA Spreadsheet Skills

    5/18

    11/13 All skills | CIMA Spreadsheet Skills

    5ww.cimaapps.com/spreadsheetskills/?cat=5

    Posted in All skills, Excel functions| Leave a reply

    AutoFilter and Advanced Filter

    Posted on January 8, 2013

    Query

    I keep using AutoFilter for data analysis but I cant help noticing theres an Advanced Filter too. What does it do? Am I using AutoFilter correctly?

    Advice

    We often filter data using Excel. For many, the AutoFilter seems to provide sufficient options, or else they will interrogate the data using PivotTables

    (see May 2009s articlefor further information).

    Sometimes, more complex analysis is required. One way this may be conducted is with Advanced Filters, but before I talk about this functionality,

    let me recap the AutoFilter.

    AutoFilter

    In Excel 2007 and later versions, filtering may be performed by creating a table first ( see May 2011s articlefor more details).

    If your data is not in an Excel table, or you are using Excel 2003 and earlier versions, then you should construct your database first as follows:

    headings: in the row immediately above the data, enter a heading for each column

    no blank rows or columns: you can leave blank cells in a row or column but make sure that there are no completely blank rows or columns

    within the database

    separate the data from the rest of your spreadsheet: keep the database on a worksheet away from other data. Imagine the database is an

    island with a moat of blank cells entirely surrounding the dataset.

    Example database layout

    To activate the AutoFilter, the top row (the headings) should be selected, and then:

    Excel 2003 and earlier Excel 2007 and later

    From the drop down menus, go to Data -> Filter ->

    AutoFilter (ALT + D + F + F).

    On the Data tab of the ribbon, go to the Sort & Filter group and click the AutoFilter icon

    (ALT + A + T).ALT + D + F + F still works.

    http://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2011/Insight-May-2011/Spreadsheet-skills-knowing-your-2007-times-tables/http://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2009/Insight-May-2009/Spreadsheet-skills-the-power-of-pivot-tables/http://www.cimaapps.com/spreadsheetskills/?p=111http://www.cimaapps.com/spreadsheetskills/?p=111http://www.cimaapps.com/spreadsheetskills/?p=125#respondhttp://www.cimaapps.com/spreadsheetskills/?cat=9http://www.cimaapps.com/spreadsheetskills/?cat=5
  • 8/13/2019 CIMA Spreadsheet Skills

    6/18

    11/13 All skills | CIMA Spreadsheet Skills

    6ww.cimaapps.com/spreadsheetskills/?cat=5

    The database may now be filtered to select data that meets certain condition by c licking on the drop down arrows to the right of each heading, viz.

    Data filtering

    This could be summarised in a PivotTable too, and the attached Excel workbook(.xls 1MB) provides an illust ration of this.

    The arrows will change appearance when a filter has been applied to that column. The filter can be removed by clicking on the filter button once

    more, or you can clear all filters in one bound (in any version of Excel) using the keyboard shortcut ALT + D + F + S (which is Show All in Excel

    2003 / earlier and Clear in Excel 2007 / later).

    This Excel feature does have limitations, however. Filtering based on more complex criteria may not be possible and data may be filtered based only

    on visible cells:

    Filter visible data only

    Moreover, there is an upper limit on the number of categories that may be filtered. For Excel 2003 and earlier versions, this limit is 1000, but this has

    been increased ten-fold to 10,000 for Excel 2007 (although Excel 2010 only appears to show 9998) and later versions:

    Excel 2003 and earlier Excel 2007 and later

    http://www.cimaglobal.com/Global/Images/InsightImages/May2012/spreadsheetskills/SP-Advanced_Filters.xls
  • 8/13/2019 CIMA Spreadsheet Skills

    7/18

    11/13 All skills | CIMA Spreadsheet Skills

    7ww.cimaapps.com/spreadsheetskills/?cat=5

    For many, the capabilities of AutoFilter far exceed its limitations, and sufficient analysis can be performed with this feature. Sometimes, however, the

    following tool may prove more bountiful

    Advanced filter

    Using the same database setup, it is possible to undertake more complicated analysis using he Advanced Filter. First select the database, and

    then:

    Excel 2003 and earlier Excel 2007 and later

    From the drop down menus, go to Data -> Filter ->

    Advanced Filter (ALT + D + F + A).

    On the Data tab of the ribbon, go to the Sort & Filter group and click the Advanced Filter

    icon (ALT + A + Q).ALT + D + F + A still works.

    This activates the following dialog box:

    Advanced filter dialog box

    It is very simple to use (it is the criteria which takes practice!) The List Range is simply the database to be reported upon including the top row

  • 8/13/2019 CIMA Spreadsheet Skills

    8/18

    11/13 All skills | CIMA Spreadsheet Skills

    8ww.cimaapps.com/spreadsheetskills/?cat=5

    headings. It does not have to include all columns but should include all rows.

    Data may be filtered either in place or else the database may be copied to another location for ease of use (if the Copy to another location option is

    selected to facilitate this, the Copy to: range becomes active).

    The Unique records only checkbox is very useful as it will automatically eliminate any duplicates from the analysis. However, a duplicate occurs

    only when the complete record (ie the values in all columns specified in the List range) appears elsewhere in the database.

    This just leaves the Criteria range:, which as I alluded to above, is where the magic happens. A criteria range consists of a minimum of two rows as

    follows:

    Example criteria table

    The first row is always the headings row. It does not always have to be populated, but if the table is to include criteria based on a certain field

    (column of data), the heading must match the heading in the source data table precisely.

    The second and subsequent rows contain the c riteria to be evaluated. These cells may be blank, contain formulae, values or tex t. Criteria on the

    same row must all be true to be filtered, whereas criteria on different rows are alternative criteria that may be met for filtering purposes.

    In this illus tration above, for a record to pass filtering it must either meet c riteria 1, 2 and 3 simultaneously or else criteria 4, 5 and 6 concurrently.

    Real-life examples might inc lude the following:

    March sales for the north division Camera sales for February and April 2012

    With a little imagination, reports can be constructed identifying duplicate data, top ten sales and even incomplete records (see the attached Excel

    workbook(.xls 1MB) for illustrations).

    Word to the wise

    Both of these types of filtering have limitations. One key restrict ion is that if the source database were to change, just like PivotTables, the filter

    reports would need to be re-run. Unlike PivotTables, however, there is no Refresh All option.

    If source data is likely to change, it may be better to consider alternative solutions to working with multiple criteria (please see my July 2009 article

    on multiple criteria).

    Posted in All skills, Excel functionalities| Leave a reply

    Modified internal rate of return (MIRR)

    Posted on January 8, 2013

    Query

    Further to your article on internal rates of return (IRRs), you mentioned that every t ime the cash flow to be assessed changes sign there could beanother solution.

    I have such a cash flow and I am looking for an objective way to analyse the return. Do you have any suggestions?

    More than one solution

    I refer you to my September 2011 article on problems with calculating IRRs in Excel.

    As the readers query states, there can be more than one IRR. Every time a cashflow series changes sign (ie goes from positive to negative or vice

    versa) there is potentially another solution. Consider the following:

    Multiple solutions

    http://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2011/Insight-September-2011/Spreadsheet-skills-Irreverent-IRR--irrelevant-or-just-incalculable/http://www.cimaapps.com/spreadsheetskills/?p=97http://www.cimaapps.com/spreadsheetskills/?p=97http://www.cimaapps.com/spreadsheetskills/?p=111#respondhttp://www.cimaapps.com/spreadsheetskills/?cat=3http://www.cimaapps.com/spreadsheetskills/?cat=5http://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2009/Insight-July-2009/Spreadsheet-skills-working-with-multiple-criteria/http://www.cimaglobal.com/Global/Images/InsightImages/May2012/spreadsheetskills/SP-Advanced_Filters.xls
  • 8/13/2019 CIMA Spreadsheet Skills

    9/18

    11/13 All skills | CIMA Spreadsheet Skills

    9ww.cimaapps.com/spreadsheetskills/?cat=5

    Here, prompted by a guess in the XIRR function (albeit of the other solution 21.43%), the two common Excel functions XIRR and IRR return the two

    IRRs associated with this cashflow scenario.

    It is important to not only check that an IRR gives an NPV of zero but that it is also the correct one in the circumstances.

    This is the first problem with the concept of IRR. However, before we look at an objective way to generate just one meaningful solution for analysis,

    Id like to consider another key issue. Forget the almost nonsensical IRR of 970.86% quoted in the above example. The other solution, 21.43%,

    seems more realistic, yes?

    As explained in my previous article, the internal rate of return (IRR) is the name given to the discount rate that makes the net present value (NPV) of

    a range of cashflows zero. For example, if I invest USD100 now and receive USD121 back in two years time, this would give me an annual IRR of

    10% since:

    (USD100) + PV(USD121) = (USD100) + USD121 / (1 + 10%)2

    = (USD100) + USD100

    NPV = 0

    It is nothing more than this. Put simply, if all cash required is borrowed at 21.43% and all surplus cash is reinvested at 21.43%, my project would

    neither create nor destroy cash value.

    Wait a minute. Reinvest at 21.43%? If I could find a risk free investment returning this sort of money, I would be depositing my pension in it, never

    mind stakeholders funds.

    The symmetry of the finance rate (cost of borrowing, typically the weighted average cost of capital) and the reinvestment rate (the return surplus

    funds can generate) is usually an absurd notion in the real world: if gains could be made in a free market, the principle of arbitrage would soon erode

    this advantage.

    If we are looking for a measure to address the multiple solutions issue of IRR, perhaps we should also ensure it considers the fact that finance rates

    tend to be greater than reinvestment rates.

    Walkthrough ex ample

    I am going to suggest the alternative measure of modified internal rate of return (MIRR). To explain how this works, I will be using the following

    example, which is included in the attached Excel file(94KB).

    Consider the following assumptions:

    MIRR assumptions (click to enlarge)

    http://www.cimaglobal.com/Documents/Insightdocs/March2012/MIRR-example.xls
  • 8/13/2019 CIMA Spreadsheet Skills

    10/18

    11/13 All skills | CIMA Spreadsheet Skills

    10/1ww.cimaapps.com/spreadsheetskills/?cat=5

    Lets keep this example nice and simple. Here, I have assumed a finance rate of 12%, a reinvestment rate of a more realistic 8% (say) and cash

    flows generated periodically at 11 points of time (time 0 being now to time 10 being ten periods from now). Notice that the cash flows change sign

    a total of five times, which means there could be potentially five different IRRs.

    This is the reason for the guess cell (G16) in the illustration above. The IRR formula in cell G24 is:

    =IRR(H22:R22,Guess)

    where changing the value of guess may cause the IRR calculated to vary (ie generate an alternative solution).

    The MIRR calculation (cell G25) is simply

    =MIRR(H22:R22,Finance_Rate,Reinvestment_Rate)

    where the Finance_Rate is entered in cell G13 and the Reinvestment_Rate is entered in cell G14. The formula for MIRR is defined as follows:

    MIRR formula

    where:

    NPV() is the Excel NPV function

    rrate is the reinvestment rate

    frate is the finance ratevalues[positive] is the positive values in the array only

    values[negative] is the negative values in the array only

    n is the number of periods.

    This formula will always give the same value regardless of the number of changes of sign in the cash flow. It also takes into account the disparity

    between reinvestment and finance rates.

    It ticks the boxes, so the only question is: what on earth does it do? Its quite simple actually in concept. Lets ignore the formula and perform the

    calculation manually with the example above.

    The first problem we have is the number of sign changes (five). To get an objective measure, we need just the one change of sign to ensure a unique

    solution. How do we do that?

    To begin with, the cash flows should be split in two as follows:

    Splitting the cash flow (click to expand)

    The attached Excel file(94KB) clearly shows how this breakdown was arrived at using MAX() and MIN() functions.

    The intention now is to replace the values in one or both rows by an equivalent single positive or negative number. This is not simply the summation

    http://www.cimaglobal.com/Documents/Insightdocs/March2012/MIRR-example.xlshttp://www.cimaapps.com/Global/Images/InsightImages/March2012/spreadsheet-skills/Image%2005%20-%20Splitting%20the%20Example%20Cash%20Flow.gifhttp://www.cimaapps.com/Global/Images/InsightImages/March2012/spreadsheet-skills/Image%2003%20-%20MIRR%20Assumptions.gif
  • 8/13/2019 CIMA Spreadsheet Skills

    11/18

    11/13 All skills | CIMA Spreadsheet Skills

    11/ww.cimaapps.com/spreadsheetskills/?cat=5

    of the rows as this does not take into account the time value of money (eg USD100 reinvested would be worth USD108 = USD100 x (1 + 8%) in the

    next period using the above assumptions).

    To work out what the discount factor should be, we need to determine the appropriate rate (finance rate for negative cash flows and reinvestment rate

    for positive cash flows) and at what point in time the cash flows are to be collated. We do this using the following table:

    Calculating the discount factors (click to expand)

    The finance rate calculates the appropriate discount factor required to generate the present values for time 0 (ie the value of all negative cash flows as

    if they had arisen in the first period). This is because for most projects, companies will invest first (negative cash flows in early periods) to receive

    positive cash flows in later periods.

    For example, the time 2 factor (0.797, cell J33) is calculated as 1/1.122, ie discounting for two periods at the finance rate of 12%.

    The reinvestment rate calculates the appropriate discount factor required to generate the present values for the final period (here, time 10 or the 11th

    period, ie the value of all positive cash flows as if they had arisen in the las t period). As before, this is because for most projects, companies will

    invest first (negative cash flows in early periods) to receive positive cash flows in later periods including the final period.

    For example, the time 7 factor (1.260, cell O34) is calculated as 1.083, ie inflating for three periods (= 10 7) at the reinvestment rate of 8%.

    Now, we simply cross multiply the discount factors (rows 33 and 34 in our example) by the split cash flows (rows 40 and 41), viz.

    Calculating the present values (click to expand)

    The negative numbers after time 0 become smaller (reflecting the discounting), whereas positive cash flows are increasingly inflated the earlier they

    are to the final period (time 10).

    We now have three alternative cash flows we can consider:

    1. Aggregate the investment (negative) cash flows only.

    2. Aggregate the returns (positive cash flows) only.

    3. Aggregate both the investment cash flows and the returns.

    Each of these options will only create one change of sign and take into account the disparate discount rates. I now consider each one in turn.

    1. Aggregate the investment (negative) cash flows only

    The attached Excel file(94KB) calculates t he following cash flow:

    Aggregation of investments only (click to expand)

    Row 85 shows a negative cash flow in the first period (being the sum of row 47) with non negative cash flows thereafter (from row 41). Having zero in

    a period does not constitute a change of sign, but these cells must be zero rather than blank else the Excel functions will not calculate correctly

    (see September 2011s IRR articlefor further details).

    http://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2011/Insight-September-2011/Spreadsheet-skills-Irreverent-IRR--irrelevant-or-just-incalculable/http://www.cimaapps.com/Global/Images/InsightImages/March2012/spreadsheet-skills/Image%2008%20-%20Aggregate%20Investments%20Only.gifhttp://www.cimaglobal.com/Documents/Insightdocs/March2012/MIRR-example.xlshttp://www.cimaapps.com/Global/Images/InsightImages/March2012/spreadsheet-skills/Image%2007%20-%20Present%20Value%20Calculation.gifhttp://www.cimaapps.com/Global/Images/InsightImages/March2012/spreadsheet-skills/Image%2006%20-%20Calculating%20the%20Discount%20Factors.gif
  • 8/13/2019 CIMA Spreadsheet Skills

    12/18

    11/13 All skills | CIMA Spreadsheet Skills

    12/1ww.cimaapps.com/spreadsheetskills/?cat=5

    Note that while the IRR changes slightly from the original calculation, the MIRR is precisely the same. This IRR is unique (only one change of sign).

    2. Aggregate the returns (positive ca sh flows) only

    The following cash flow may be calculated:

    Aggregation of returns only

    Row 96 shows several negative cash flows (referenced to row 40) with a non negative cash flow in the final period (being the sum of row 48).

    Note that again the IRR changes from the original calculation (it is reduced since all positive cash flows have been moved to the final period), the

    MIRR is precisely the same. As before, this IRR is unique (only one change of sign).

    3. Aggregate both the investments and the returns (MIRR approach)

    This is the first cash flow shown in the outputs section of the attached Excel file(94KB):

    Aggregation of both investments and returns (MIRR approach; click to expand)

    Row 73 contains only two non zero flows: the present value of all investments at time 0 and the future value of all returns at time 10. As before, forthis to work correctly, the interim period cash flows must be zero rather than blank.

    As above, the IRR will be unique, but this time the IRR equals the MIRR. This is how the MIRR is calculated. Indeed, cell G77 contains an alternative

    method of calculation, the exponential growth approach, calculated as:

    =(32,366/12,701)1/10

    This is essentially the MIRR formula:

    MIRR formula

    where:

    NPV() is the Excel NPV function

    rrate is the reinvestment rate

    frate is the finance rate

    values[positive] is the positive values in the array only

    values[negative] is the negative values in the array only

    n is the number of periods.

    Using the formula, MIRR is arguably quicker to calculate than IRR, more objective (only one solution) and takes into account the differing rates

    implicit in the cash flows. MIRR is usually lower than IRR (assuming the reinvestment rate will be lower than the finance rate), unless the

    http://www.cimaapps.com/Global/Images/InsightImages/March2012/spreadsheet-skills/Image%2010%20-%20Aggregate%20Investments%20and%20Returns%20(MIRR%20Approach).gifhttp://www.cimaglobal.com/Documents/Insightdocs/March2012/MIRR-example.xlshttp://www.cimaapps.com/Global/Images/InsightImages/March2012/spreadsheet-skills/Image%2009%20-%20Aggregate%20Returns%20Only.gif
  • 8/13/2019 CIMA Spreadsheet Skills

    13/18

    11/13 All skills | CIMA Spreadsheet Skills

    13/1ww.cimaapps.com/spreadsheetskills/?cat=5

    reinvestment rate equals the finance rate, whereby altering the cash flows as depicted above will neither affect the NPV nor the IRR.

    The MIRR is often seen as a financial measure of an investments attractiveness. It is used frequently in capital budgeting to rank alternative

    investments of s imilar size (although this may not always be an appropriate approach: NPV or NPV per USD invested (the so called bang for buck

    key factor analysis) may be more suitable metrics).

    There is much confusion about what the reinvestment rate implies. However, both the NPV and the IRR techniques assume the cash flows generated

    by a project are reinvested within that same project.

    This is not always the case: often, they are often reinvested elsewhere within the business and it is not a necessary assumption that the firm is

    capable of generating that IRR elsewhere. Indeed, one implication of the MIRR is that the project is not capable of generating cash flows as predicted

    and that the projects NPV is overstated.

    Posted in All skills, Excel functions| Leave a reply

    Modelling actual versus budget

    Posted on January 8, 2013

    Query

    I have to keep track of how actual data compares to the original budget / forecast data and report the variances. Do you have any tips as to how to

    structure my spreadsheet?

    Advice

    This is an area where I have seen modellers get into a mess with alarming regularity. However, with a lit tle thought at the outset, the OFFSET

    function (also seeApril 2009s article) can prove very useful.

    OFFSET reme mbered

    As a reminder, the syntax for OFFSET is as follows:

    OFFSET(Reference,Rows,Columns,[Height],[Width]).

    The arguments in square brackets (Height and Width) can be omitted from the formula and will be for the entirety of this article.

    In its most basic form, OFFSET(Ref,x,y ) will select a reference x rows down (-x would be x rows up) and y rows to the right (-y would be y rows to

    the left) of the reference Ref.

    To assist with this months topic, please feel free to download the attached Excel file(239KB).

    Setting up the original budget / forecast data

    This can simply be typed in, but given the what if analysis demanded of most finance professionals these days, I would be tempted to set i t up in a

    scenario table, viz.

    Setting up a scenario table

    This method allows for various scenarios t o be modelled easily with a different set of input data inserted into each column (from column L onwards in

    this i llustration). A selector (cell J11 in the figure above) is used to select the active scenario, which may be highlighted using conditional formatting

    (see August 2009s article).

    The data used to drive the model is then highlighted in column J (here, emphasised in yellow) using the following formula for cell J14 for example:

    =OFFSET(K14,,$J$11)

    In other words, this formula looks up data x columns to the right of column K, where x is specified as the value input in cell J11 (here, this value is 4

    http://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2009/Insight-August-2009/Spreadsheet-skills-conditional-formatting/http://www.cimaglobal.com/Documents/Insightdocs/Jan2012/SP-actual-vs-budget.xlshttp://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2009/Insight-April-2009/Spreadsheet-skills-better-scenario-analysis-with-OFFSET/http://www.cimaapps.com/spreadsheetskills/?p=90http://www.cimaapps.com/spreadsheetskills/?p=90http://www.cimaapps.com/spreadsheetskills/?p=97#respondhttp://www.cimaapps.com/spreadsheetskills/?cat=9http://www.cimaapps.com/spreadsheetskills/?cat=5
  • 8/13/2019 CIMA Spreadsheet Skills

    14/18

  • 8/13/2019 CIMA Spreadsheet Skills

    15/18

    11/13 All skills | CIMA Spreadsheet Skills

    15/1ww.cimaapps.com/spreadsheetskills/?cat=5

    formula in row 23 in my example, which is (for cell L23):

    =IF(L$18",L$18,IF(L$3=1,L$11,K23*(1+L$11))),

    ie, if there is data in the corresponding cell in row 18 use it; if not, if it is t he first period take the original input value, otherwise simply inflate the prior

    period amount by (1 + growth rate for that period). It may include a nested IF statement, but it is still a relatively simple and straightforward

    calculation.

    Presentation of the outputs

    Performing the calculations is only half of the battle. Modellers often have difficulty comparing the original outputs with the reforecast counterparts in

    an effective and efficient manner. If sufficient, the following would be relatively straightforward:

    Comparing actual data with the original budgeted information

    This is very easy to put together, but alas, more often than not, t he following presentation is required by senior management instead:

    Typical variance analysis output

    Seem familiar? I have been a model reviewer for many a year and seen this type of output on a regular basis. Many senior management teams like it

    this way and it is not my role to challenge the status quo well, at least not on this forum anyway!

    The problem with this layout, however, is t hat it lends itself to promoting poor practice. Models constructed in this way require a large number of

    unique formulae across a row, which in turn slows down model construction and increases the potential for mistakes, such as referencing errors.

    If you have to use this layout, creating the s imple summary elsewhere (maybe on an input page),

    Interim calculation

    inserting two additional lines on the output sheet and using the OFFSET function once more may make your potential troubles a thing of the past,

    viz.

    Revised outputs

    The interim calculation is straightforward, summarising the original calculations, the revised calculations and the difference (variance) between them.

    Looking at the attached Excel file, you will see that each row of the revised output example contains only one unique formula copied across, making

    it easy to edit, extend and review. This is achieved by adding two rows:

    Selector (row 7): identifies whether the column should be reporting the budget information, the actual data or the variance. The equation used makes

  • 8/13/2019 CIMA Spreadsheet Skills

    16/18

    11/13 All skills | CIMA Spreadsheet Skills

    16/1ww.cimaapps.com/spreadsheetskills/?cat=5

    use of the MOD(number,divisor) function (see November 2011s article):

    =MOD(L$4,List_Depth)+IF(MOD(L$4,List_Depth)=0,List_Depth,0),

    List_Depth is the number of selections (Budget, Act / Refcast, Variance) permissible in this case three. =MOD(L$4,List_Depth) takes the counter

    and converts each one to 1, 2 and 0 (ie the remainder upon dividing the counter by three). The remainder of the calculation,

    +IF(MOD(L$4,List_Depth)=0,List_Depth,0), simply forces a 0 to 3 instead, so that the Selector gives the values 1, 2 and 3 alternately.

    Year No. (row 8): simply notes which year the column is reporting using the formula: =ROUNDUP(L$4/List_Depth,0), ie the year increases the period

    after the counter is a multiple of three (in this example). Using List_Depth as a variable means that this idea can be easily extended to summarise

    other data such as reforecasts, % differences etc (ie have different periodicities).

    In my example, row 13 requires a very simple formula to generate the required outputs:

    =OFFSET(BC_Sales_Summary,L$7,L$8).

    BC_Sales_Summary is a range name (see October 2011s article) where BC stands for base cell and in my example would be cell K28 in the

    interim calculation illustration. The reference would then be offset by Selector number of rows (e.g. if the value of Selector were 3 it would reference

    the Variance row) and by Year No. number of columns (e.g. if the value of Year No. were 2 it would refer to the 2013 data). For example, cell Q13

    equals OFFSET(BC_Sales_Summary,3,2), which would refer to the 2013 Variance figure USD840.

    Easy!

    This idea can be extended very simply using range names for greater transparency. Please see the attached Excel file(239KB) for further details.

    Posted in All skills, Modelling| Leave a reply

    Automated file names

    Posted on January 8, 2013

    Query

    For version control purposes, I want to display the current filename of my workbook within one or more worksheets. Is there a way to do this short of

    typing it in manually?

    Advice

    Where theres a will theres a way, and I use the following formula:

    =IF(ISERROR(OR(FIND([",CELL("filename",A1)),FIND("],CELL(filename,A1)))),",MID(CELL(filename,A1),FIND([",CELL("filename",A1))+1,FIND("],CELL(filename

    FIND([",CELL("filename",A1))-1))

    Obvious, yes?

    I have a rule of thumb when writing a formula. Quite literally. In general, for formulae to be transparent, they should appear no longer than the length

    of your thumb in the formula bar.

    Of course, there are exceptions to many great rules, and this is one of them. The above formula needs explanation.

    Padded CELL

    This function returns information about the formatting, location, or contents of the upper left cell in a reference. In our example, we will be using cell

    A1 as our reference in the active worksheet, but this selection is entirely arbitrary as long as a selection is made.

    Info_Type Returns

    "address" Reference of the first cell in reference, as text.

    "col" Column number of the cell in reference.

    "color" 1 if the cell is formatted in colour for negative values; otherwise returns 0 (zero).

    "contents" Value of the upper left cell in reference; not a formula.

    " filename" Filename (inc luding full path) of the fi le that contains reference, as tex t. Returns empty tex t (" ") i f the

    worksheet that contains reference has not yet been saved.

    " format " Tex t value corresponding to the number format of the cell . The tex t values for the various formats are shown in

    the following table. Returns "-" at the end of the text value if the cell is formatted in colour for negative values.

    http://www.cimaapps.com/spreadsheetskills/?p=65http://www.cimaapps.com/spreadsheetskills/?p=65http://www.cimaapps.com/spreadsheetskills/?p=90#respondhttp://www.cimaapps.com/spreadsheetskills/?cat=4http://www.cimaapps.com/spreadsheetskills/?cat=5http://www.cimaglobal.com/Documents/Insightdocs/Jan2012/SP-actual-vs-budget.xlshttp://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2011/Insight-October-2011/Spreadsheet-skills-naming-names/http://www.cimaglobal.com/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2011/Insight-November-2011/Spreadsheet-skills-right-to-use-MOD/
  • 8/13/2019 CIMA Spreadsheet Skills

    17/18

  • 8/13/2019 CIMA Spreadsheet Skills

    18/18

    11/13 All skills | CIMA Spreadsheet Skills

    =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("],CELL(filename,A1))-FIND([",CELL("filename",A1))-1)

    And so we are done. Except we arent, quite.

    Step three: error trapping

    A good modeller will always make sure that a formula will work in all foreseeable circumstances. The above formula will only work if the file has been

    named and saved. Otherwise, CELL("filename",A1) will return empty text (), which will cause the embedded FIND formulae to return #VALUE!

    errors, so the overall formula will also return the #VALUE! error.

    We need an error trap a check that ensures that if the file has not been saved we just get empty text () returned. To do this, we can use the

    following formula:

    =IF(ISERROR(OR(FIND("[",CELL("filename",A1)),FIND("],CELL(filename,A1)))),",1)

    ISERROR(expression) gives a value of TRUE if the expression is evaluated as an error, otherwise it is FALSE. In our equation above, if the file has

    not been saved, this formula will return the empty text (), otherwise it will return our dummy value of 1. Substituting our derived formula above for

    the 1 gives us the final formula:

    =IF(ISERROR(OR(FIND([",CELL("filename",A1)),FIND("],CELL(filename,A1)))),",MID(CELL(filename,A1),FIND([",CELL("filename",A1))+1,FIND("],CELL(filename

    FIND([,CELL(filename,A1))-1))

    It is not pretty, short or transparent, but it is flexible and robust.

    Final note

    The formula above is intended to be copied as it is straight into an Excel worksheet by pasting it directly into the Excel formula bar and pressing

    ENTER. In certain si tuations it will not work due to your copying method, font, or the setup of the ASCII characters.

    In this instance, try retyping all of the inverted commas ( and ) in the formulae first. If this doesnt work you will have to retype it . Cest la vie.

    Posted in All skills, Useful formulae| Leave a reply

    http://www.cimaapps.com/spreadsheetskills/?p=65#respondhttp://www.cimaapps.com/spreadsheetskills/?cat=6http://www.cimaapps.com/spreadsheetskills/?cat=5