Results 1 to 6 of 6

iferror when calculating historical average of row, return an average of similair row.

Threaded View

  1. #1
    Registered User
    Join Date
    05-24-2012
    Location
    atlanta
    MS-Off Ver
    Excel 2010
    Posts
    45

    iferror when calculating historical average of row, return an average of similair row.

    So, calculating a very simple forecast, being an average of historicals.

    Problem is, some products have no history, so the history is all null.

    In this case, Id like to pull an average of other products produced at the same location.

    something like this. assume its the 1st of march, and jan and feb are actual data, forecasting march.
    product  plant      jan      feb     march
    A          Atlanta   4         8        "6"
    B          Chicago  -          -        "NULL"
    C          Chicago  5         10       "7.5"
    What I want it to do is say, ok, so no data for B, iferror takes care of that.

    Then we will take an average of other products from Chicago, return "7.5"

    I tried just doing an averageif, but the problem is, it find itself, so it creates a circular reference... I could manually exclude its own row, but thats tedious and will surely break down the road.

    Is there a better way? maybe averageifs and include (=plant, <>product)?

    edit: tried my own suggestion, looks like I may need to rethink the logic. even if I exclude itself, when there are 2 products with no data, they look to each other to find an average based on the other. No bueno.

    Edit 2- Instead of averaging the column of averages, I am attempting to average the source data that should not circle back.

    =AVERAGEIFS($D$6:K$37,A6:A37,"<>"&A6,$B$6:$B$37,$B6)
    Tried that, where D6:K37 is the previous data, A6 is product, B6 is Plant. Their respective criteria range are the labels.

    It returns #Value though.
    Last edited by bauerbach; 06-19-2012 at 03:55 PM.

Thread Information

Users Browsing this Thread

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

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