Is there a formula that works similar to a pivot table's count filter that spills?

reaktorblue

Board Regular
Joined
Aug 8, 2007
Messages
87
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm using the following formula to create a list of unique entries, sorted alphabetically however, what I would like to do is also count how many times in my table those unique entries are mentioned. I've been doing this via pivot table however, if possible, I would like to do this via formula to avoid having to refresh the pivot table every time I would like to see it updated.

If I use "COUNTA" or "COUNTIF" formulas, although they work, they don't spill down like the below formula does. Is it possible to create a formula that spills down, giving a count on those unique entries?

VBA Code:
=SORTBY(UNIQUE(FILTER(tblTransactions[Transaction Type],tblTransactions[Transaction Type]<>"")),UNIQUE(FILTER(tblTransactions[Transaction Type],tblTransactions[Transaction Type]<>"")))
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
How about
Excel Formula:
=COUNTIF(tblTransactions[Transaction Type],A2#)
Change the A2 to the cell with your sortby formula.
You could possibly simplify your formula like
Excel Formula:
=SORT(UNIQUE(FILTER(tblTransactions[Transaction Type],tblTransactions[Transaction Type]<>"")))
 
Upvote 0
How about
Excel Formula:
=COUNTIF(tblTransactions[Transaction Type],A2#)
Change the A2 to the cell with your sortby formula.
You could possibly simplify your formula like
Excel Formula:
=SORT(UNIQUE(FILTER(tblTransactions[Transaction Type],tblTransactions[Transaction Type]<>"")))

This works perfectly!! Thank you so much!

Also, I appreciate you taking the time to help me find a better way to write my original sort formula. Thanks a ton, that was awesome!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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