How do I exclude certain cells from a sum product formula in Excel?

ardask

New Member
Joined
Oct 30, 2020
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Using sum product I calculate weighted average of rate of amounts I have, as per below case I would like to exclude highlighted amount and rate from the formula. Any quick solutions?
Thanks
Arda

1604056116369.png
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
You could use an extra column as a control by entering 1 (include) or 0 (exclude) in C2:C17, then change your formula to
Excel Formula:
=SUMPRODUCT(A2:A17,B2:B17,C2:C17)/SUMPRODUCT(A2:A17,C2:C17)
 
Upvote 0
You could use an extra column as a control by entering 1 (include) or 0 (exclude) in C2:C17, then change your formula to
Excel Formula:
=SUMPRODUCT(A2:A17,B2:B17,C2:C17)/SUMPRODUCT(A2:A17,C2:C17)
Thanks Jason, adding an extra column will not really help me here as the picture I sent was only a small part of a bigger file (as below). Excluding and including will depend on the cell I take as a reference and it will not be always the same whether I exclude or not. Any solutions coming to your mind without adding an extra column?


1604057712474.png
 
Upvote 0
If you want to exclude all rows that are equal to a single reference cell then you could use something like.
Excel Formula:
=SUMPRODUCT(A2:A17,B2:B17,--(A2:A17<>A4))/SUMPRODUCT(A2:A17,--(A2:A17<>A4))
Formulas like this are often unique to the requirement so we would need to know the nuances of the criteria to be come up with anything more definitive.
For example do you want to exclude any amount with a specific rate? Any rate with a specific amount? A specific rate with a specific amount? Multiple rates and / or amounts?
 
Upvote 0
Cross posted How do I exclude certain cells from a sum product formula in Excel?

While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered elsewhere.
 
Upvote 0

Forum statistics

Threads
1,214,946
Messages
6,122,401
Members
449,081
Latest member
JAMES KECULAH

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