+ Reply to Thread
Results 1 to 26 of 26

Average function and two criteria

  1. #1
    Registered User
    Join Date
    08-19-2005
    Posts
    4

    Question Average function and two criteria

    Hi!
    I'd appreciate your help with a formula. I'm trying to get the avarage ages of all the people on a list that meet two different criteria. The Ages are in column F and the criteria are in in columns A and B.
    Could you please tell me what's wrong with my formula? I'm entering it as an Array formula.


    {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}

    Many thanks

    Paula

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Try...

    =AVERAGE(IF((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H"),ARGENTINA!F1:F995))

    ...confirmed with CONTROL+SHIFT+ENTER, not just ENTER. Adjust the ranges accordingly.

    Hope this helps!

    Quote Originally Posted by Paula M
    Hi!
    I'd appreciate your help with a formula. I'm trying to get the avarage ages of all the people on a list that meet two different criteria. The Ages are in column F and the criteria are in in columns A and B.
    Could you please tell me what's wrong with my formula? I'm entering it as an Array formula.


    {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}

    Many thanks

    Paula
    Last edited by Domenic; 08-19-2005 at 04:38 PM.

  3. #3
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  4. #4
    Registered User
    Join Date
    08-19-2005
    Posts
    4

    Talking

    THANK YOU BOTH!!
    The two options worked just fine!

  5. #5
    Registered User
    Join Date
    08-19-2005
    Posts
    4

    Average problem

    Hi,
    I need your help again. Now, I need to know the avarage age of the people belonging to the Sales deparment that are either category "C" or "H".
    Column A has the different departments (S, F, D, E, etc), column B, the different categories (C, H, B, etc), and column F has the employee ages.
    I thought of this:

    =((AVERAGE(IF((ARGENTINA!$A$1:$A$999="S")*(ARGENTINA!$B$1:$B$999="C"),ARGENTINA!$F$1:$F$999)))+(AVERAGE(IF((ARGENTINA!$A$1:$A$999="S")*(ARGENTINA!$B$1:$B$999="H"),ARGENTINA!$F$1:$F$999))))/2
    Entering it with Ctrl+shift+enter as an array formula.

    It works fine when both averages are greater than 0, but it is no good when one of them is 0. Any ideas to solve my problem? All suggestions are welcomed!

    Thanks for your help!

  6. #6
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Try...

    =AVERAGE(IF((ARGENTINA!$A$1:$A$999="S")*(ISNUMBER(MATCH(ARGENTINA!$B$1:$B$999,{"C","H"},0))),ARGENTINA!$F$1:$F$999))

    ...confirmed with CONTROL+SHIFT+ENTER.

    Hope this helps!

    Quote Originally Posted by Paula M
    Hi,
    I need your help again. Now, I need to know the avarage age of the people belonging to the Sales deparment that are either category "C" or "H".
    Column A has the different departments (S, F, D, E, etc), column B, the different categories (C, H, B, etc), and column F has the employee ages.
    I thought of this:

    =((AVERAGE(IF((ARGENTINA!$A$1:$A$999="S")*(ARGENTINA!$B$1:$B$999="C"),ARGENTINA!$F$1:$F$999)))+(AVERAGE(IF((ARGENTINA!$A$1:$A$999="S")*(ARGENTINA!$B$1:$B$999="H"),ARGENTINA!$F$1:$F$999))))/2
    Entering it with Ctrl+shift+enter as an array formula.

    It works fine when both averages are greater than 0, but it is no good when one of them is 0. Any ideas to solve my problem? All suggestions are welcomed!

    Thanks for your help!

  7. #7
    Registered User
    Join Date
    08-19-2005
    Posts
    4

    Thumbs up

    Thank you again, Domenic!

  8. #8
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  9. #9
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  10. #10
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  11. #11
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  12. #12
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  13. #13
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  14. #14
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  15. #15
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  16. #16
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  17. #17
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  18. #18
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  19. #19
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  20. #20
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  21. #21
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  22. #22
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  23. #23
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  24. #24
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  25. #25
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


  26. #26
    Aladin Akyurek
    Guest

    Re: Average function and two criteria

    =AVERAGE(IF(ARGENTINA!$A$1:$A$995="S",IF(ARGENTINA!$B$1:$B$995="H",ARGENTINA!F5:F999)))

    which must be confirmed with control+shift+enter, not just with enter.

    Paula M wrote:
    > Hi!
    > I'd appreciate your help with a formula. I'm trying to get the avarage
    > ages of all the people on a list that meet two different criteria. The
    > Ages are in column F and the criteria are in in columns A and B.
    > Could you please tell me what's wrong with my formula? I'm
    > entering it as an Array formula.
    >
    >
    > {=IF(((ARGENTINA!$A$1:$A$995="S")*(ARGENTINA!$B$1:$B$995="H")),AVERAGE(ARGENTINA!F5:F999),0)}
    >
    > Many thanks
    >
    > Paula
    >
    >


+ 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