Sumproduct with Average

chandrashekar

Well-known Member
Joined
Jul 15, 2005
Messages
529
Office Version
  1. 365
Platform
  1. Windows
Hi,

How to get average based on multi condition. I am getting count correctly but I need average. Average Column is at C. E2 & F2 mentioned in formula is DATE and D2 is Company Name and I need avergage based on this conditions.

Thanks in advance.

=SUMPRODUCT(--(A2:A2000>=E2);--(A2:A2000<=F2);--(B2:B2000=D2))

Regards,

Chandra Shekar B
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Try something like this...
Code:
=SUMPRODUCT(--(A2:A2000>=E2);--(A2:A2000<=F2);--(B2:B2000=D2);C2:C2000)/
 SUMPRODUCT(--(A2:A2000>=E2);--(A2:A2000<=F2);--(B2:B2000=D2))
 
Upvote 0
Try

=AVERAGE(IF((A2:A2000>=E2)*(A2:A2000<=F2)*(B2:B2000=D2);C2:C2000))

Must be array confirmed using Shift Ctrl Enter

Or with excel 2007 or newer try

=AVERAGEIFS(C2:C2000;A2:A2000;">="&E2;A2:A2000;"<="&F2;B2:B2000;D2)
 
Last edited:
Upvote 0
Hi,

One more question how to get min & max value using sumproduct.

Thanks in Advance

Regards,

Chandra Shekar B
 
Upvote 0
Use the array method

=AVERAGE(IF((A2:A2000>=E2)*(A2:A2000<=F2)*(B2:B2000=D2);C2:C2000))

Must be array confirmed using Shift Ctrl Enter

Change AVERAGE to MIN or MAX.
 
Upvote 0
Seems pointless as both serve the same purpose

=sumproduct(max((A2:A2000>=E2)*(A2:A2000<=F2)*(B2:B2000=D2)*C2:C2000))
 
Upvote 0
Hi,

I tried MIN function which is not working. Please let me know what is the problem is.

=SUMPRODUCT(MIN(($A$2:$A$2000>=E2)*($A$2:$A$2000<=F2)*($B$2:$B$2000=D2)*$C$2:$C$2000))

Thanks

Chandra Shekar B
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,852
Members
452,948
Latest member
UsmanAli786

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