Average with specific criteria

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
 
T

T. Valko

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
 
T

Teethless mama

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
 
M

Marcelo

SUMIF(A:A,"EDCP",B:B)/COUNTIF(A:A,"EDCP")
--
pleae click yes if it was helpfull
regards from Brazil
Marcelo



"Clari" escreveu:
 
S

Shane Devenshire

Hi,

and a non-array 2003 version formula:

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

where D1 contain EDCP
 
T

Teethless mama

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top