+ Reply to Thread
Results 1 to 2 of 2

Brain fade in using an OR statement within an averageif function

  1. #1
    Forum Contributor Grimace's Avatar
    Join Date
    05-04-2009
    Location
    Gold Coast, Australia
    MS-Off Ver
    Excel 2013 and Office 365 Plus
    Posts
    380

    Brain fade in using an OR statement within an averageif function

    The code i am trying to use, obviously incorrectly, is as follows:

    Please Login or Register  to view this content.
    If I use it with only a single criteria (eg

    Please Login or Register  to view this content.
    it works just fine, however i need to average if any of the cells in the column are either a 2,3,4,5 or 6.

    I know it should be simple, but im not getting it.
    Any advice would be appreciated please

    Darren.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Brain fade in using an OR statement within an averageif function

    hi Darren, noticed you are using Excel 2003 but have AVERAGEIF? if you also have AVERAGEIFS, you can use:
    =AVERAGEIFS(E4:E93,B4:B93,">=2",B4:B93,"<=9")

    if not:
    =SUMPRODUCT((B4:B39>=2)*(B4:B39<=9)*(E4:E39))/SUMPRODUCT((B4:B39>=2)*(B4:B39<=9))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ 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