AVERAGEIFS + OR + One More Criteria....

alexx579

New Member
Joined
Aug 19, 2014
Messages
44
Hi,

In Row A, let's say I have a either of the listed:
Company A
Company B
Company C
Company D

In Row B, let's say I have a either of the listed:
Product 1
Product 2
Product 3
Product 4

In Row C, I have a bunch of random prices listed.

How can I create a formula where I want the average of both Company A OR Company B for Product 1? I want one average price no matter if it is company A or B, for Product 1. How do I do that?? THANKS!!! I am gonna want average for combinations of companies and products, the actual data is 12 deep on companies and 13 on products.
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try:

=SUM(SUMIFS(C:C,A:A,{"Company A","Company B"},B:B,"Product 1"))/SUM(COUNTIFS(A:A,{"Company A","Company B"},B:B,"Product 1"))


If you want to put "Company A" and "Company B" in F2:F3 so that you can easily change them without having to change the formula, try:

=SUMPRODUCT(SUMIFS(C:C,A:A,F2:F3,B:B,"Product 1"))/SUMPRODUCT(COUNTIFS(A:A,F2:F3,B:B,"Product 1"))
 
Last edited:
Upvote 0
This version should let you choose the companies and products you want to include:

ABCDEFGHI
1CompanyProductAmountCompanyProductAverage
2A11A14.6
3B12B4
4C23C3
5D24
6A15
7B26
8C17
9A18
10X39

<tbody>
</tbody>
Sheet7

Array Formulas
CellFormula
H2{=SUM(SUMIFS(C:C,A:A,E2:E15,B:B,TRANSPOSE(F2:F15)))/SUM(COUNTIFS(A:A,E2:E15,B:B,TRANSPOSE(F2:F15)))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>


Put the companies in column E, products in F.
 
Upvote 0

Forum statistics

Threads
1,215,561
Messages
6,125,538
Members
449,236
Latest member
Afua

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