averaging based on several criteria
I've tried the formulaes as you suggested but get the result #N/A.
I can't get the averageifs to work at all (but I have office 2003).
Any suggestions?
Thanks,
Paul
"T. Valko" wrote:
Try one of these:
This array formula** works in all versions of Excel :
=AVERAGE(IF((C1:C15<70)*(M1:M15="X"),N1:N15))
Or, this normally entered formula in Excel 2007 only:
=AVERAGEIFS(N1:N15,C1:C15,"<70",M1:M15,"X")
Better to use cells to hold the criteria:
A1 = 70
B1 = X
=AVERAGE(IF((C1:C15<A1)*(M1:M15=B1),N1:N15))
=AVERAGEIFS(N1:N15,C1:C15,"<"&A1,M1:M15,B1)
** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)
--
Biff
Microsoft Excel MVP
"Paul" wrote in message
...
I need to averge based on several criteria.
In column C I have ages
In column M I have words for medication used by a patient
In column N I have numbers
I'd like to search column C for certain ages and then M for a drug and
then
average the dose (in column N) for those meeting criteria for both colums
C
and M
i.e. average dose (column N) for people under 70 (column C) on drug x
(column M).
I'd really appreciate any help.
Paul
|