Hi Yujin,

Your code worked perfectly after I separate your code. For the value 1 for the column A, and the value -1 for column B.
Searching for 1 and -1 in A:A column didn´t work.

Thank you very much for your help.
All the best.
B.