average on 2 conditions

G

Guest

suppose cells are a1:b4 have following values

east 5
west 7
north 6
east 3

so you can do an average like =average(if(a1:a4="east",b1:b4)) and that will
equal a value of 4 -- (5+3)/2

What if you wanted to calculate the average of numbers in a1:a4 where it
equaled 2 conditions - either east or west. So that would be 5 -- (5+3+7)/3.

How would the second formula be written to average numbers where either of
two conditions are met?
 
G

Guest

Does this formula work in specific versions of Excel. I tried reproducing
this case in Excel 2002. It didnt work. Using
=average(if(a1:a4="east",b1:b4)) gives me the result as 5.25 which is the
average of all the values put together and not 4.

Thanks

Venky
 
A

Aladin Akyurek

You need to confirm such formulas with control+shift+enter instead of
just with enter.
 
G

Guest

Thanks Aladin, That did work. Could you tell me why do we need to valdiate
using
control+shift+enter and not enter. Just curious to know
 

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