hi mnur. in L1:
=SUM(IF(FREQUENCY(IF($B$2:$B$25<>"",MATCH($B$2:$B$25,$B$2:$B$25,0)),ROW($B$2:$B$25)-ROW($B$2)+1),1))
in J3:
=INDEX($B$2:$B$25,MATCH(0,IF($B$2:$B$25<>"",COUNTIF(J$2:J2,$B$2:$B$25)),0))
in K3:
=COUNTIF($B$2:$B$25,J3)
in L3:
=SUMIF($B$2:$B$25,J3,$C$2:$C$25)
L1 & J3 contains array formulas...confirmed by pressing CTRL-SHIFT-ENTER to activate the array. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL-SHIFT-ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
another alternative is to use pivot tables
Bookmarks