calculate the average insde an array

Greenstuffs

New Member
Joined
May 31, 2012
Messages
9
I have the following data and i need to get the average lets say between asia and america, i can't consolidate the names because they are actually different countries in each continent but i need to know like the average of the countries between the continents, and to make things even harder sometimes i get 0s in the data. I have tried index and match functions but can only pick up one, sumproduct doesn't work all the way. Any input is appreciated
Thx

EuropeEuropeAsiaAsiaAmericaAmerica
Europe125955
Europe145345
Asia165935
Asia685925
America1105315
America1125505

<colgroup><col width="64" span="7" style="width:48pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Excel Workbook
ABCDEFG
1EuropeEuropeAsiaAsiaAmericaAmerica
2Europe125955
3Europe145345
4Asia165935
5Asia685925
6America1105315
7America1125505
8
93.75
Sheet1
 
Upvote 0
Maybe...

=SUMPRODUCT((B1:G1="America")*(A2:A7="Asia"), B2:G7) / (COUNTIF(B1:G1, "America")*COUNTIF(A2:A7,"Asia"))
 
Upvote 0
Actually i tried both formulas and both worked, Robert ones would work as long as there are no alphabetic characters in the array and shg would work even though there are characters in the array. Both are good.
Again thank you for sharing your knowledge
 
Upvote 0
Could you specify?
if you mean like that:
Excel Workbook
ABCDEFG
1*EuropeEuropeAsiaAsiaAmericaAmerica
2Europe125955
3Europe145345
4Asia1659A5
5Asia685925
6America1105315
7America1125505
8*******
94******
103******
Sheet1


It is actually other way around.
 
Upvote 0

Forum statistics

Threads
1,207,283
Messages
6,077,518
Members
446,287
Latest member
tjverdugo85

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