+ Reply to Thread
Results 1 to 4 of 4

Help: Need to function that averages based on several criteria

  1. #1
    Registered User
    Join Date
    12-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    7

    Help: Need to function that averages based on several criteria

    Example.xls

    Hi all,

    So I have a spreadsheet which lists alternating columns of "Scheduled" and "actual" hours of items which our company needs to maintain for each month. The names of the items are listed in the rows. Depending on the maintenance, (tier 1, tier 2, tier 3) the scheduled hours for each month will be different. The scheduled hours will be set (ex. Tier 1 maintenance will always take 2hrs, tier 2 always 6 hrs etc.). So I will need to average the actual hours based on the tier categories (tier 1,2 and 3).


    So is there a way to average the actual hours of each month based on the the values of the corresponding scheduled hours?

    Heres an example: (refer to the attached spreadsheet)

    in this spreadsheet, there are 2 tiers: 1M ELECTRL PM GERT COMP W/IFIX and 2M CREATE DRIVE IMAGE AND PLC CODE BACK. They have scheduled hours of 2 and 4hrs respectively.

    So is there a way for me to average all the tier 1 and tier 2 actual hours for each maintenance item seperately? (e.g. average all of the actual hours of maintenance item 48360 that contains scheduled hours of 2).

    Another way to say this is to Average across the orange cells for each maintenance item only if the yellow cells are of a certain value.

    Sorry for the confusing explanation, any help is appreciated!!

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Help: Need to function that averages based on several criteria

    I am not sure what gets averaged for Tier 1 and/or Tier 2. None of the rooms seem to indicate which tier they relate to, and I don't understand the relevance of 2/4 hours. Can you clarify?

  3. #3
    Registered User
    Join Date
    12-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Help: Need to function that averages based on several criteria

    So this is the way the excel sheet is laid out:

    -The cells located under the blue row shows us the Tier and the associated hours. In this case there are two tiers: one that takes 2 scheduled hours to do and one that takes 4 scheduled hours to do. These are estimates.

    -"sheduled" hours and "actual" hours are allocated to each month. The scheduled hours, in this example, will either be 2 or 4 hrs (the scheduled hours are based the tiers listed under the blue row).

    -the "actual" hours are times which our mechanics input after they finish the work that they have been given.

    -as an example please refer to cell E3 and F3: in this case, the scheduled hours it takes to do a 3month ELECTRICAL INSPECTION is 2. The actual amount of time it took our mechanic to do it is 1 (since its under "actual" hours).

    So what I would like to do is to find a formula which is able to give me the averages of the actual hours for a tier 1 (column O)and for Tier 2 (column P). you can differentiate whether the actual hours is a tier 1 or 2 by looking at the scheduled hours for the same month.

    EX:
    -I would like to find the average actual hours for tier 1 (cell O3)
    -since Tier 1 is represented by anything with scheduled hours of 2 that will be cells E3, I3, K3
    -The actual hours that we would like to average are cells next to E3, I3 and K3. So we would want to take the average of F3, J3, and L3
    - the actual average of F3, J3 and L3 will be calculated in cell O3.

    -In P3, we want the Tier 2 averages and therefore will be the value contained in H3, since G3 is the only cell in that row with a scheduled of 4hours.

    I apologise for the lengthy explaination. I hope this makes sense

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Help: Need to function that averages based on several criteria

    Use these array formulae

    =AVERAGE(IF((MOD(COLUMN($E3:$M$3),2)=1)*($E3:$M3=$C$12),(MOD(COLUMN($F3:$N3),2)=0)*($F3:$N3)))

    and

    =AVERAGE(IF((MOD(COLUMN($E3:$M$3),2)=1)*($E3:$M3=$C$13),(MOD(COLUMN($F3:$N3),2)=0)*($F3:$N3)))

+ Reply to Thread

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