Totaling only filtered value on formula with multiple criteria

goodomens

New Member
Joined
Aug 20, 2022
Messages
8
Office Version
  1. 2021
Platform
  1. MacOS
I have the below spreadsheet, and I need it to automatically calculate totals when filtered, with multiple criteria on.

Basically: I am trying to get totals on column D for "NP", but only when column B is a unique value. I have a formula for that already:
=SUM(--(LEN(UNIQUE(FILTER(B2:B23,(D2:D23="NP"))))>0))

I just need it to only count the filtered values when I filter by date, rather than the whole thing. I have the sums doing that, and this is the formula I'm using for those:
=SUBTOTAL(109, O2:O23)

Any ideas/suggestions?

test 2.png
 
I'm so sorry, maybe I'm just not totally understanding, but this doesn't seem to work. I greatly appreciate you trying though!
You can try

Excel Formula:
=SUBTOTAL(102,A2:A23)

in totals row below and when you filter the above table manually it will give you the desired result. Try That.
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I would use a helper column in P2 put this formula & fill down
Excel Formula:
=SUBTOTAL(103,B2)
Then you can use
Excel Formula:
=ROWS(UNIQUE(FILTER(B2:B23,(D2:D23="NP")*(P2:P23=1))))
I think that shall work, because it will only count visible cell in Column P

Rest the Unique and filter formula would do. Interesting.

Lets see if that works for querist or not.
 
Upvote 0
I would use a helper column in P2 put this formula & fill down
Excel Formula:
=SUBTOTAL(103,B2)
Then you can use
Excel Formula:
=ROWS(UNIQUE(FILTER(B2:B23,(D2:D23="NP")*(P2:P23=1))))
That worked. THANK YOU!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,858
Members
449,052
Latest member
Fuddy_Duddy

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