View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Herbert Seidenberg Herbert Seidenberg is offline
external usenet poster
 
Posts: 1,180
Default Count Unique records based on the Criteria in another colum

You can also use Pivot Table and a simple formula:
Assume your two columns have headers An and Bn.
Pivot Table Options: Uncheck grand totals.
Layout: Row = An, Column = Bn, Data = Count of Bn
The PT will look like this:
An 4 5 Rajat Three Two Unique
any 1 1 2 3
how 1 1
when 2 1
who 1 1
why 2 1
Select "An" thru "why" ( 6x1 cells) and
Insert Name Create Top Row
Select "any" thru "2" ( 5x6 cells)
Insert Name Create Left Column
The "Unique" column has been added next to the PT.
"Unique" has this formula:
=COUNTA(INDIRECT(An))