Excel question

Soldato
Joined
23 Oct 2002
Posts
5,722
Location
Various
Hi folks,

ocukexample.png


This is a much simplified example of something I'm working on. What i am trying to do is calculate an average in the final column of only the values that fall inside the upper and lower bounds.

For example: for 'Country 2' i would like the average of 59, 101, 103 = 87.7

I know how to do this using the averageifs function, but (as far as i can see) this only works with fixed numbers (see below). I need it to refer to the upper and lower bound cells, as the values in these cells will change.

Country 1 example: =AVERAGEIFS(B3:G3,B3:G3,">5",B3:G3,"<15") This works great but instead of ">5" and "<15" i need it to refer to the cells H3 and I3


I hope this make sense

Thanks
 
I haven't got Excel 2007, and I don't think this function existed before then, so I can't test.

But you could try:

=AVERAGEIFS(B3:G3,B3:G3,">"&H3,B3:G3,"<"&I3)
 
Back
Top Bottom