Counting instances of text in a table column with filters applied.

vanwooten

New Member
Joined
Dec 15, 2020
Messages
43
Office Version
  1. 365
Platform
  1. Windows
The attached picture shows column W with W7:W7 containing a list and color formatting. The table column below (Trades[Trade Category]) uses the list above for a drop down and I have Conditional formatting to match the colors. The percentages to the left are meant to be the percent of each category being displayed. I have the formula blow which works so long as no filter is applied to the table. The formulas dont give an error but they give unpredictable results when the table is filtered. I need to tweak the formula so that it works when the table is filtered.

=SUMPRODUCT((Trades[Trade Category]=W2)*(SUBTOTAL(103,OFFSET(W2,ROW(Trades[Trade Category])-MIN(ROW(Trades[Trade Category])),0))))/SUBTOTAL(103,Trades[Trade Date])

Trades[TradeDate] is present in every record.
 

Attachments

  • 2022-09-14.png
    2022-09-14.png
    28.3 KB · Views: 8

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
I have seen a solution that looks close but I dont understand it. I suspected that I might need a helper column.

 
Upvote 0

Forum statistics

Threads
1,215,730
Messages
6,126,528
Members
449,316
Latest member
sravya

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