Forumla to work out average

nathan663

Board Regular
Joined
Dec 3, 2008
Messages
153
In column B i have a list of numbers eg. 671, 672, 673 etc. these numbers are repeated a number of times. In column O I have a list of numerical numbers that i need to work out the averages for.

So i need a formula that looks up all the 671's in column B and takes their scores from column O and works returns the average.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Which version of Excel are you using? In Excel 2007 and later you can use AVERAGEIF function

=AVERAGEIF(B:B,671,O:O)
 
Upvote 0
Try

=AVERAGE(IF(B1:B100=671,O1:O100))

IMPORTANT
This is an array formula that requires CTRL + SHIFT + ENTER
After entering the formula, highlight the cell with the formula and press F2
Then press CTRL + SHIFT + ENTER
When entered correctly, the formula will be enclosed in {brackets}

Also, you cannot use entire column references like B:B, must use row #s like B1:B100
Unless in XL2007 or higher. And even then it's not recommended.
 
Upvote 0
i am still using 2000, but i will be getting 2007 soon, however i need the formula to work on both versions

thanks
 
Upvote 0
OK then, you can use Jonmo's array formula suggestion or for a non-array version

=SUMIF(B1:B100,671,O1:O100)/MAX(1,COUNTIF(B1:B100,671))
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,025
Members
448,939
Latest member
Leon Leenders

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