This is a discussion on averageif - multiple criteria within the Excel Questions forums, part of the Question Forums category; This is definitely a simple question and i'm certain it's something that i'm overlooking in writing a formula, but say ...
This is definitely a simple question and i'm certain it's something that i'm overlooking in writing a formula, but say you have 5 values:
A1: 600
A2: 715
A3: 822
A4: 901
A5: 1001
B1: 600
B2: 950
I want to create an averageif formula. What i would like it do is to average if higher than 600, but lower than 950. So the formula i have is:
=AVERAGEIF($a$1:$a$5,"<="&B2). What am i missing for the second part -- greater than b1? For some odd reason i'm not typing the formula in correctly to get the right answer here - can anyone help
You could also try...
=AVERAGE(IF($A$1:$A$5>=B1,IF($A$1:$A$5<=B2,$A$1:$A$5)))
...confirmed with CONTROL+SHIFT+ENTER.
Jeff
Hello clock245, welcome to MrExcel.
I assume you are using Excel 2007 since AVERAGEIF function doesn't exist in earlier versions. For multiple criteria there is also an AVERAGEIFS function, in your scenario you can use that like this:
=AVERAGEIFS($A$1:$A$5,$A$1:$A$5,"<="&B2,$A$1:$A$5,">="&B1)
Thanks all! I will use Mr. Houdini's formula - exactly what i was looking for. i've used it before, but i completely blanked on the formula (surprisingly i never looked past the =averageif on the autocomplete to recognize it - stupid me!)
Thanks again all!
A bit of a thread dig - but was wondering if there's a way of getting an averageifs to use a multiple OR criteria, i.e. TRUE *or* FALSE.
You probably can't use AVERAGEIFS for that but there are other ways.....how many criteria do you have, can you expand a little on what you want to do?
Like this thread? Share it with others