+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    04-07-2009
    Location
    Los Angeles, United States
    MS-Off Ver
    Office 2008-Mac
    Posts
    49

    Countif with other functions -- Median, IF, Count

    I feel like I should know this, but I'm having a brain cramp.

    I want to find the average of column B for the values that have "Y" in column D.


    I'm also looking for this one:

    For all values that have "Y in column D, how many of those have "N" in column Z.



    Can someone point me in the right direction, thanks!
    Last edited by shg; 02-01-2010 at 06:20 PM.

  2. #2
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    5,213

    Re: Countif with other functions -- Median, IF, Count

    In Excel 2007 and later (and presumably Mac2008 and later?) you can use the AVERAGEIF (one criteria) and AVERAGEIFS (multiple criteria) function.

    If those aren't available, you can use the array version like:

    =AVERAGE(IF(D1:D100="Y",B1:B100))

    confirmed with CTRL+SHIFT+ENTER, not just ENTER. (The AVERAGEIF/S do not need to be array entered.)

  3. #3
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    5,828

    Re: Countif with other functions -- Median, IF, Count

    Hi

    1.
    Code:
    =AVERAGEIF(D1:D100,"Y",C1:C100)
    2.
    Code:
    =COUNTIFS(D1:D100,"Y",N1:N100,"N")
    Rgds
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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.2.0