SUMPRODUCT/SUBTOTAL Problem

howsono

New Member
Joined
Sep 25, 2014
Messages
2
I'm trying to put together a formula to count up how many students get each grade in a filtered list. I discovered the following formula somewhere which seemed to be working, but on the spreadsheet in question both D and D- grades are coming up as 2 whereas there are actually only 1 of each!

=SUMPRODUCT(SUBTOTAL(3,OFFSET($W$2:$W$162,ROW($W$2:$W$162)-MIN(ROW($W$2:$W$162)),,2)),--($W$2:$W$162=V181))

I can't pose attachments but can email or dropbox or whatever the file if there is not enough information here? Any help would be appreciated!!!

thanks
 

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.

NewOrderFac33

Well-known Member
Joined
Sep 26, 2011
Messages
1,268
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
Welcome to the Forum!

Don't know if it's of any help, but I had a similar issue with SUMPRODUCT last week where it was reporting inflated count values.

I never got to the bottom of it, but found that using SUMIFS instead resolved the issue and returned the correct values.

Pete
 

XOR LX

Well-known Member
Joined
Jul 2, 2012
Messages
4,517
Hi.

Your reference and height parameters for OFFSET were not correct for your set-up.

Try:

=SUMPRODUCT(SUBTOTAL(3,OFFSET($W$2,ROW($W$2:$W$162)-MIN(ROW($W$2:$W$162)),,,)),--($W$2:$W$162=V181))

Regards
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,214
Messages
5,836,045
Members
430,402
Latest member
bcurran2

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
Top