Spreadsheet: 526140d1499158790-extract-numbers-for-given-creteria-excluding-duplicates-extract-numbers-for-given-creteria-excluding-duplicates
Sheet: Sheet1

 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | R | CAB
 |  |  |  |  |  |  | H | R |  | Input |  | Desired output by formula
 |  |  |  |  |  |  | 168 | CAB |  | CAB |  | 168 |  |  |  |  | Row Labels
 |  |  |  |  |  |  | 764 | BBB |  |  |  | 503 |  |  |  |  | 168
 |  |  |  |  |  |  | 686 | CCC |  |  |  | 708 |  |  |  |  | 326
 |  |  |  |  |  |  | 804 | BAC |  |  |  | 360 |  |  |  |  | 360
 |  |  |  |  |  |  | 510 | ACB |  |  |  | 625 |  |  |  |  | 503
 |  |  |  |  |  |  | 174 | ACB |  |  |  | 870 |  |  |  |  | 622
 |  |  |  |  |  |  | 217 | BCA |  |  |  | 888 |  |  |  |  | 625
 |  |  |  |  |  |  | 139 | CBA |  |  |  | 622 |  |  |  |  | 708
 |  |  |  |  |  |  | 624 | ABC |  |  |  | 326 |  |  |  |  | 870
 |  |  |  |  |  |  | 627 | CBA |  |  |  |  |  |  |  |  | 888
 |  |  |  |  |  |  | 418 | CCC |  |  |  |  |  |  |  |  | Grand Total
 |  |  |  |  |  |  | 122 | AAA
 |  |  |  |  |  |  | 503 | CAB
 |  |  |  |  |  |  | 736 | AAA
 |  |  |  |  |  |  | 767 | CCC
 |  |  |  |  |  |  | 367 | ABC
 |  |  |  |  |  |  | 777 | BCA
 |  |  |  |  |  |  | 708 | CAB
 |  |  |  |  |  |  | 819 | BCA
 |  |  |  |  |  |  | 828 | BBB
 |  |  |  |  |  |  | 114 | ABC
 |  |  |  |  |  |  | 803 | BBB
 |  |  |  |  |  |  | 766 | AAA
 |  |  |  |  |  |  | 655 | BCA
 |  |  |  |  |  |  | 536 | ACB
 |  |  |  |  |  |  | 436 | AAA
 |  |  |  |  |  |  | 811 | ABC
 |  |  |  |  |  |  | 950 | CBA
 |  |  |  |  |  |  | 360 | CAB
 |  |  |  |  |  |  | 708 | CAB
 |  |  |  |  |  |  | 912 | BBB
 |  |  |  |  |  |  | 434 | CCC
 |  |  |  |  |  |  | 494 | AAA
 |  |  |  |  |  |  | 269 | ABC
 |  |  |  |  |  |  | 434 | CBA
 |  |  |  |  |  |  | 956 | AAA
 |  |  |  |  |  |  | 283 | BBB
 |  |  |  |  |  |  | 473 | BBB
 |  |  |  |  |  |  | 827 | CCC
 |  |  |  |  |  |  | 181 | AAA
 |  |  |  |  |  |  | 983 | ACB
 |  |  |  |  |  |  | 313 | CBA
 |  |  |  |  |  |  | 470 | BAC
 |  |  |  |  |  |  | 386 | CBA
 |  |  |  |  |  |  | 989 | AAA
 |  |  |  |  |  |  | 780 | CCC
 |  |  |  |  |  |  | 625 | CAB
 |  |  |  |  |  |  | 779 | BBB
 |  |  |  |  |  |  | 680 | AAA
 |  |  |  |  |  |  | 870 | CAB
 |  |  |  |  |  |  | 311 | BAC
 |  |  |  |  |  |  | 551 | BCA
 |  |  |  |  |  |  | 638 | BBB
 |  |  |  |  |  |  | 215 | BCA
 |  |  |  |  |  |  | 879 | BBB
 |  |  |  |  |  |  | 888 | CAB
 |  |  |  |  |  |  | 948 | ACB
 |  |  |  |  |  |  | 271 | BBB
 |  |  |  |  |  |  | 477 | CCC
 |  |  |  |  |  |  | 110 | AAA
 |  |  |  |  |  |  | 468 | CBA
 |  |  |  |  |  |  | 638 | AAA
 |  |  |  |  |  |  | 312 | CCC
 |  |  |  |  |  |  | 799 | CCC
 |  |  |  |  |  |  | 300 | BAC
 |  |  |  |  |  |  | 217 | BBB
 |  |  |  |  |  |  | 808 | ACB
 |  |  |  |  |  |  | 708 | CAB
 |  |  |  |  |  |  | 814 | BBB
 |  |  |  |  |  |  | 622 | CAB
 |  |  |  |  |  |  | 855 | BAC
 |  |  |  |  |  |  | 666 | BCA
 |  |  |  |  |  |  | 258 | BAC
 |  |  |  |  |  |  | 888 | CAB
 |  |  |  |  |  |  | 974 | BAC
 |  |  |  |  |  |  | 708 | CAB
 |  |  |  |  |  |  | 326 | CAB
 |  |  |  |  |  |  | 691 | CBA
 |  |  |  |  |  |  | 845 | CCC
 |  |  |  |  |  |  | 588 | CBA
 |  |  |  |  |  |  | 493 | CCC
 |  |  |  |  |  |  | 136 | BBB
 |  |  |  |  |  |  | 632 | ACB
 |  |  |  |  |  |  | 437 | AAA
 |  |  |  |  |  |  | 163 | AAA
 |  |  |  |  |  |  | 279 | BAC
 |  |  |  |  |  |  | 719 | AAA
 |  |  |  |  |  |  | 162 | CCC