+ Reply to Thread
Results 1 to 3 of 3

averageifs question

  1. #1
    Registered User
    Join Date
    10-11-2006
    Posts
    51

    averageifs question

    I am trying to find the average of some rows in a long array of records.

    averageifs does an average of a cell if the boolean AND of all the criterias are met, i.e. average if A=X AND B=Y AND C=Z. I need a combination of boolean AND and OR, eg: average if (A=X) AND (B=Y OR C=Z). How would I do this?

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: averageifs question

    Try: =AVERAGE(IF((A1:A10="X")*((B1:B10="Y")+(C1:C10="Z")),D1:D10))

    Confirmed with Ctrl+Shift+Enter as it's an array formula.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    10-11-2006
    Posts
    51

    Re: averageifs question

    Domski, thanks!

+ 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