+ Reply to Thread
Results 1 to 3 of 3

average if?

  1. #1
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    average if?

    Is there a way to average by category for a particular month? In the spreasheet attached I would like to average the following

    New OB
    New GYN
    RTN (Return/Sick Visit)

    By the month they occurred which is in row 2 highlighted in yellow. The grey columns give me the number of days which is what I want to average.
    Attached Files Attached Files
    Last edited by day92; 04-05-2011 at 07:20 PM.

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: average if?

    In C34 put this?

    =AVERAGEIF($A$3:$A$32,$A34,C3:C32)

    Is that what you want?

    Or, on second read, is this it?

    =SUMPRODUCT(($A$3:$A$32=$A34)*(MONTH(B$3:B$32)=MONTH(B$2))*(C3:C32))/SUMPRODUCT(($A$3:$A$32=$A34)*(MONTH(B$3:B$32)=MONTH(B$2)))

    or this array formula

    =AVERAGE(IF((A3:A32=A34)*(MONTH(B3:B32)=MONTH(B2)),(C3:C32)))
    Last edited by Cutter; 04-05-2011 at 07:04 PM.

  3. #3
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    Re: average if?

    Cutter - yes that is exactly what I was looking for. thanks for your assistance. I could not figure that out for the life of me.

+ 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