+ Reply to Thread
Results 1 to 3 of 3

Average IF uneven data

  1. #1
    Registered User
    Join Date
    03-22-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    63

    Average IF uneven data

    Hi,

    I am trying to take averages of monthly returns to make them annual (just by multiplying by 12). However, problem is that data is not constant and it brakes in certain months, therefore I cannot just do the 12 month average as now did in row H. What would be the the formula for such a problem.
    I could probably do it by doing 12x2 IF statements but that doesn't seem reasonable as doing this way my excel would crash because of multiple loops through 100k+ data calculations.

    Thank you for your answer.

    Regards,
    drakaz
    Attached Files Attached Files
    Last edited by drakaz; 01-10-2014 at 07:47 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Average IF uneven data

    Heres how I would do this.

    Create a small table, years dow, months across...
    I
    J
    K
    L
    1
    1
    2
    3
    2
    2002
    0.022891
    -0.02174
    0.091241
    3
    2003
    -0.01931
    -0.01604
    0.024798
    4
    2004
    0.03545
    0.041509
    0.00889
    5
    2005
    -0.01978
    0.004105
    0.015111
    6
    2006
    0.039835
    0.017458
    0.023493
    7
    2007
    0.035673
    -0.02929
    0.024518
    8
    2008
    -0.06859
    -0.01822
    -0.00537
    9
    2009
    -0.10177
    -0.10594
    0.158638
    10
    2010
    0.003369
    0.037573
    0.140448
    11
    2011
    -0.01194
    0.0347
    -0.00596
    12
    2012

    Then in J2, copied down and across...
    =IFERROR(AVERAGEIFS($G:$G,$D:$D,$I2,$C:$C,J$1),"")

    I am trying to take averages of monthly returns to make them annual (just by multiplying by 12).
    That is mathematicaly incorrect. You cannot calc a yearly avg by * monthly avg, you need to take the base data and calc it that way
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    03-22-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    63

    Re: Average IF uneven data

    That could work if I could create a small table, but there's more than 70000 columns with different months, years but a third axis - company ticker, which wouldn't allow to create 2D table I suppose, or I am missing something?

    Statistically multiplying monthly average by 12 to get the annual one is almost correct with only a small error, one could also multiply the last, 12th, month and get the same thing, only maybe with higher error, but still in line with returns.
    Last edited by drakaz; 01-10-2014 at 08:01 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Split uneven data from a single columns to multiple columns
    By pfoz in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-13-2013, 08:24 AM
  2. Sort and Match Uneven Columns of data
    By MustardMan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-21-2012, 01:43 PM
  3. Mathematical differences between uneven columns?
    By bgfar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2011, 09:17 AM
  4. advanced filter for two uneven columns
    By jrtaylor in forum Excel General
    Replies: 2
    Last Post: 06-09-2011, 01:49 PM
  5. Moving average for uneven sampled data?
    By Johan Myrberger in forum Excel General
    Replies: 1
    Last Post: 01-17-2005, 05:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1