+ Reply to Thread
Results 1 to 2 of 2

Averageif() and OR() AND() functions

  1. #1
    Registered User
    Join Date
    11-24-2009
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    16

    Averageif() and OR() AND() functions

    I have run into this a couple of times, but sometimes I have tried to create an averageif with an equivalent of the OR() function and sometimes with an AND() function. I have not actually used this functions, but I have used them in Excel 2003:

    =AVERAGE(if((Sheet1!$A:$A="REG")*(Sheet1!$A:$A="CT"),Sheet1!$B:$B)

    However, I would like to do this all in Excel 2007 without using control shift and enter.I have tried something similar to this with no luck

    =AVERAGEIFS(Sheet1!$B:$B,Sheet1!$A:$A,or("REG","CT"))

    I will probably add some more parameters too, so using a countif with the sumif might create one long formula. Can this even be created within an 2007 Excel Averageif statement?

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Averageif() and OR() AND() functions

    AVERAGEIFS, COUNTIFS and SUMIFS are designed to consist of AND only arguments... so you can't really do it with a simple AVERAGEIFS statement... but there are workarounds to avoid the CSE entry.

    For example:

    Please Login or Register  to view this content.
    Edit: just noticed your comment about the COUNTIFS/SUMIFS long formula... I am not sure of any other way, except may using helper columns and then simple Average based on that....
    Last edited by NBVC; 11-23-2010 at 04:11 PM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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