Sumproduct with a twist

rebelroy

Board Regular
Joined
Nov 30, 2008
Messages
211
Hi all,

I have a sumproduct formula in a cell that returns a count of the number of times several columns satisfy certain conditions.

One column referred to in the formula contains a unique identifier.

How can I tweak the sumproduct formula so that it will ignore any repeat instances in the unique identifier column?

Thanks
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi Lenze,

Thanks for your reply.

My formula is:

=SUMPRODUCT((A3:A300="On")*(B3:B300="M")*(D3:D300="18-25")*(F3:F300="Inside"))

Now I'm afraid I've mislead you in my first post. The unique idendifier is in column C and so is not part of the formula.

Now if the unique identifier is duplicated anywhere in C3:3000, I want the formula to ignore the duplicate(s). Therefore, I presume that I must include column C in the formula but how?

Thanks for your help.
 
Upvote 0
Try this formula

=SUM(IF(FREQUENCY(IF((A3:A300="On")*(B3:B300="M")*(D3:D300="18-25")*(F3:F300="Inside")*(C3:C300<>""),MATCH(C3:C300,C3:C300,0)),ROW(C3:C300)-ROW(C3)+1),1))

This is an "array formula" that needs to be confirmed with CTRL+SHIFT+ENTER so that curly braces appear around the formula in the formula bar.....
 
Upvote 0
Thanks Barry.

I'll have to wait till tomorrow to try that one. I'll get back to you then.

Thanks again.
 
Upvote 0
Hi Barry,

It works fine, thanks. I'm not sure I follow what you've done entirely. Would you mind explaining your formula please?
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,591
Members
449,089
Latest member
Motoracer88

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