1. Mengambil data Unik Tanpa Kriteria
Kasus diatas jika table tidak ada yang kosong atau blank:
Rumus 1 (Array Formula):
=IFERROR(INDEX($A$3:$A$11; MATCH(0;COUNTIF($C$2:C2;$A$3:$A$11);0));"")
Rumus 2 (Non Array Formula):
=LOOKUP(REPT("Z";255);CHOOSE({1;2};"";INDEX($A$3:$A$11;MATCH(TRUE;INDEX(ISNA(MATCH($A$3:$A$11;$E$2:$E2;0));0);0))))
Rumus 3 (Non Array Formula):
=IFERROR(INDEX($A$3:$A$11;MATCH(0;INDEX(COUNTIF($F$2:F2;$A$3:$A$11);0;0);0));"")
Jika tabel terdapat data yang kosong/blank, maka rumus diatas akan gagal kalkulasinya:
Rumus 1 (Array Formula):
=IFERROR(INDEX($A$16:$A$24; MATCH(0;COUNTIF($C$15:C15;$A$16:$A$24&"");0));"")
Rumus 2 (Array Formula):
=IFERROR(INDEX($A$16:$A$24; MATCH(0;IF(ISBLANK($A$16:$A$24);1;COUNTIF($E$15:E15; $A$16:$A$24)); 0));"")
Rumus 3 (Array Formula):
=IFERROR(INDEX($A$16:$A$24;SMALL(IF(FREQUENCY(IF($A$16:$A$24<>"";MATCH("~"&$A$16:$A$24&"";$A$16:$A$24&"";0));ROW($A$16:$A$24)-ROW($A$16)+1);ROW($A$16:$A$24)-ROW($A$16)+1);ROWS($A$1:A1)));"")
Rumus 4 (Array Formula):
=IFERROR(INDEX($A$16:$A$24;AGGREGATE(15;6;IF(FREQUENCY(IFERROR(MATCH(IF($A$16:$A$24<>"";$A$16:$A$24);$A$16:$A$24;0);"");ROW($A$16:$A$24)-ROW($A$16)+1);ROW($A$16:$A$24)-ROW($A$16)+1);ROWS($A$1:A1)));"")
2. Mengambil data Unik Dengan Kriteria
Nah Kasus ke-2 ini mengambil data unik dengan kriteria, misalnya contoh di atas kita ingin mengambil produk PT. ABC, dan di tabel terdapat data duplikat atau yang sama, dan itu tidak diinginkan, hanya data unik saja yang diambil.
Rumusnya:
=IFERROR(INDEX($B$2:$B$11;AGGREGATE(15;6;IF(FREQUENCY(IFERROR(MATCH(IF($A$2:$A$11=$A$14;$B$2:$B$11);$B$2:$B$11;0);"");ROW($B$2:$B$11)-ROW($B$2)+1);ROW($B$2:$B$11)-ROW($B$2)+1);ROWS($A$1:A1)));"")