Subtotal and Unique

itsgrady

Board Regular
Joined
Sep 11, 2022
Messages
115
Office Version
  1. 2021
Platform
  1. Windows
  2. MacOS
I can get Excel to use the UNIQUE Formula for a column in a Table, but I am not able to do a subtotal formula using the UNIQUE Formula.

This formula is given a subtotal COUNTA of the entire column: Returns 1034

=SUBTOTAL(3,Table1[PType])

But I need a subtotal of the Unique CountA of the table column.

=SUBTOTAL(3,UNIQUE(Table1[PType])). Should return 8, but it not allowing the formula.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
How about
Excel Formula:
=ROWS(UNIQUE(FILTER(Table1[PType],SUBTOTAL(3,OFFSET(Table1[[#Headers],[PType]],SEQUENCE(ROWS(Table1[PType])),0))=1)))
 
Upvote 1
Solution
How about
Excel Formula:
=ROWS(UNIQUE(FILTER(Table1[PType],SUBTOTAL(3,OFFSET(Table1[[#Headers],[PType]],SEQUENCE(ROWS(Table1[PType])),0))=1)))

Thanks!!! I appreciate the help! I would have never guessed or been able to worked this out without your help. Have a great day.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,170
Messages
6,123,422
Members
449,099
Latest member
COOT

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