I am looking for a function that can give me unique count of values in one column based on condition if met in a differnt column.

Eg:

COL A COL B

AB cat

AB dog

LK horse

LK dog

LK dog

LK rat

Answer: Unique count with LK in column A is 3.

Appreciate any help!

Thanks,

Supat