Count filtered text only

Status
Not open for further replies.

scoobyblue

Active Member
Joined
Jun 30, 2004
Messages
380
I have a spreadsheet with a list of headings down column 'B'. Following formula calculates the number of unique text values; =SUMPRODUCT(1/COUNTIF(B6:B192,B6:B192))

This produces a result of '10', but when it is filtered and showing less visible unique text values it still shows '10'. How can my formula adjust to show number of visible unique text values after applying a filter?

Also, if the range in the formula can be extended to accommodate future additions to the column this would be useful. At present the range has to end at the last entry 'B192', otherwise the result is ♯DIV/0!. So when additions to column are input I have to keep extending the range in the formula.

Many thanks for your help.
Scoobyblue
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Status
Not open for further replies.

Forum statistics

Threads
1,224,534
Messages
6,179,391
Members
452,909
Latest member
VickiS

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