Subtotal with sumproduct and countif

canuck99

New Member
Joined
Apr 12, 2019
Messages
4
I need to use the SUBTOTAL function within a formula that uses SUMPRODUCT AND COUNTIF. The formula I'm using does a count of records in a list, eliminating duplicates. Now I need to use the SUBTOTAL function along with it to calculate the count of records, eliminating duplicates, when I filter on one of the fields. The formula I'm currently using looks like this:

=SUMPRODUCT(1/COUNTIF(i6:i13,i6Li13))

Thanks a lot
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Without looking at your formula, my first guess is that you ranges are not equal, i.e. if the data you want to uniquely count is in column A, rows 2 to 100, make sure all your cell references say A2:A100.

Also, it is an array formula so make sure to press Ctrl + Shift + Enter
 
Upvote 0
Try this:

=SUMPRODUCT(SUBTOTAL(103,OFFSET(I6,ROW(I6:I13)-ROW(I6),0)),1/COUNTIF(I6:I13,I6:I13))
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,216,049
Messages
6,128,496
Members
449,455
Latest member
jesski

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