averaging conditions

newbie2

New Member
Joined
Aug 15, 2011
Messages
8
Hi,

I would like to average a set of number within a range of age. I have in column a the age from 0-25, column B is the weight. I like to know what is the average weight for individuals from 3 to 5. I used =+AVERAGEIFS($B$3:$B$25,$A$3:$A$25,B64); B64 is the age criteria which is <=5. The results I get is an average of all weight from 0-5.

thanks
newbie2
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hey,

I would do it the long way and in coloumn C insert if statement saying anybody over the age of "X" bring back weight then in coloumn D insert one saying younger then "Y" and in E have the if statement saying if there is a value in both use the information. Hope that helps but if anybody knows a better way ild love to know :)

Regards,
Newbie2011
 
Upvote 0
Hi,

I would like to average a set of number within a range of age. I have in column a the age from 0-25, column B is the weight. I like to know what is the average weight for individuals from 3 to 5. I used =+AVERAGEIFS($B$3:$B$25,$A$3:$A$25,B64); B64 is the age criteria which is <=5. The results I get is an average of all weight from 0-5.

thanks
newbie2
You have to define both ends of the age criteria since you also have ages less than 3.

Like this:

=AVERAGEIFS($B$3:$B$25,$A$3:$A$25,">=3",$A$3:$A$25,"<=5")

If you use cells to hold the age criteria:
  • X1 = 3
  • X2 = 5
=AVERAGEIFS($B$3:$B$25,$A$3:$A$25,">="&X1,$A$3:$A$25,"<="&X2)
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top