View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Domenic[_2_] Domenic[_2_] is offline
external usenet poster
 
Posts: 265
Default unique records formula

Since you haven't provided me with the cell references and the name of
the worksheet containing the formulas returning the results, try the
following....

On a separate sheet...

B2, confirmed with CONTROL+SHIFT+ENTER:

=SUM(IF(FREQUENCY(IF(SUBTOTAL(2,OFFSET(Sheet1!D2:D 2042,ROW(Sheet1!D2:D204
2)-ROW(Sheet1!D2),0,1)),Sheet1!D2:D2042),IF(SUBTOTAL( 2,OFFSET(Sheet1!D2:D
2042,ROW(Sheet1!D2:D2042)-ROW(Sheet1!D2),0,1)),Sheet1!D2:D2042)),1))

or

=SUM(IF(FREQUENCY(IF(SUBTOTAL(2,OFFSET(Sheet1!D2:D 2042,ROW(Sheet1!D2:D204
2)-ROW(Sheet1!D2),0,1)),Sheet1!D2:D2042),Sheet1!D2:D2 042),1))

C2, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=IF(ROWS(C$2:C2)<=$B$2,LARGE(IF(ISNA(MATCH(Sheet1! $D$2:$D$2042,$C$1:C1,0)
),IF(SUBTOTAL(2,OFFSET(Sheet1!$D$2:$D$2042,ROW(She et1!$D$2:$D$2042)-ROW(S
heet1!$D$2),,1)),Sheet1!$D$2:$D$2042)),1),"")

Hope this helps!

In article ,
MP wrote:

Sure, No formula in C1 just the filtered title "Products".

C2:C2042 contain various product names
D2:D2042 contain various product values
both are on the same worksheet. Sheet 1 "ProdData"