I did modify NBVC's amazing formula in the above thread to achieve the correct result

=SUM(SUM(--(N((OFFSET(C5013,-J5013+1,0))=R5013))+SUM(--(N(OFFSET(C5012,-J5012+1,0))=R5013)))>0,SUM(--(N((OFFSET(D5013,-K5013+1,0))=S5013))+SUM(--(N(OFFSET(D5012,-K5012+1,0))=S5013)))>0,SUM(--(N((OFFSET(E5013,-L5013+1,0))=T5013))+SUM(--(N(OFFSET(E5012,-L5012+1,0))=T5013)))>0,SUM(--(N((OFFSET(F5013,-M5013+1,0))=U5013))+SUM(--(N(OFFSET(F5012,-M5012+1,0))=U5013)))>0,SUM(--(N((OFFSET(G5013,-N5013+1,0))=V5013))+SUM(--(N(OFFSET(G5012,-N5012+1,0))=V5013)))>0,SUM(--(N((OFFSET(H5013,-O5013+1,0))=W5013))+SUM(--(N(OFFSET(H5012,-O5012+1,0))=W5013)))>0,SUM(--(N((OFFSET(I5013,-P5013+1,0))=X5013))+SUM(--(N(OFFSET(I5012,-P5012+1,0))=X5013)))>0)
The formula checks only the 2 values from each column. As I would like to check 10 or more values in each column, using a formula is a little difficult. Thank you