if = accross multple cells code example
Example 1: check if values in two columns are equal excel
=IF(COUNTIF($B:$B, $A2)=0, "No match in B", "")
Example 2: if a1='' and b1='' to check two column cells in excel
=IF((AND(A1="A", B1="B")), "1", "0")