I am trying to find a match for the City and when a difference occurs for the State. The formula that I was trying to use was =IF(AND(A1=A2,B1<>B2),"City Same","Different State") but there is an error in the formula and my knowledge with formulas is a bit limited


City State Results
Boston MA City Diff / State Same
Brooklyn MA City Diff / State Diff
Boston NY Citty Same / State Diff
Boston MA City Same / State Same
Boston MA City Diff / State Diff
Brooklyn NY