Counting Filtered Unique Records

Pinball

Board Regular
Joined
Apr 18, 2002
Messages
107
MsgBox Range("B1", ActiveSheet.Range("B65536").End(xlUp)).Count

I am applying this code to a Filtered list for unique records, but the msgbox returns total number of records instead of unique.
What do I change to return the count of unique, visible records? Something like:

MsgBox Range("B1", ActiveSheet.Range("B65536").End(xlUp)).UniqueCount

Thanks.
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

New Poster

New Member
Joined
Aug 22, 2002
Messages
22
MsgBox Range("B1", ActiveSheet.Range("B65536").End(xlUp)).SpecialCells(xlCellTypeVisible).Count
 

Watch MrExcel Video

Forum statistics

Threads
1,118,113
Messages
5,570,266
Members
412,314
Latest member
yazanwael
Top