Average with specific criteria

  • Thread starter Thread starter Clari
  • Start date Start date
C

Clari

I need to average the cells on column b that correspond to the criteria in
column a. If cells in column a match "EDCP", average the cells in column b
that correspond to those cells, not the whole column. In this case it would
equal 00:30. I will appreciate your help.

Order Procedure Drawn to Received
EDCP 0:06
CBCsD 0:06
UA 0:16
EDCP 0:59
CBCsD 0:59
Troponin-I 0:59
EDCP 0:25
 
Try one of these...

All versions of Excel, array entered**:

=AVERAGE(IF(A1:A7="EDCP",B1:B7))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

Format as [h]:mm

Excel 2007 only, normally entered:

=AVERAGEIF(A1:A7,"EDCP",B1:B7)

Format as [h]:mm
 
XL2007

=AVERAGEIF(A2:A8,"EDCP",B2:B8)
just press enter


All versions

=AVERAGE(IF(A2:A8="EDCP",B2:B8))
ctrl+shift+enter, not just enter
 
SUMIF(A:A,"EDCP",B:B)/COUNTIF(A:A,"EDCP")
--
pleae click yes if it was helpfull
regards from Brazil
Marcelo



"Clari" escreveu:
 
Hi,

and a non-array 2003 version formula:

=SUMPRODUCT(--(A:A=D1),B:B/COUNTIF(A:A,D1))

where D1 contain EDCP
 
=SUMPRODUCT(--(A:A=D1),B:B/COUNTIF(A:A,D1))

You can not use a whole column prior to xl-2007
 
Back
Top