In cell C3 insert the formula: =IF(C1=C2, 1,0)
and extend it to cell G3. "1" indicated the match, "0" correspondingly, a mismatch. You can do it vice versa, like: =IF(C1=C2,0,1)
and then apply SUM operator to cells: SUM(C3:G3)
. "0" indicates full match, any non-zero indicates number of cells with mismatches.
Or you can do it in VBA:
Function IsEqual() As Boolean
If Range("C1").Value & Range("D1").Value & Range("E1").Value & Range("F1").Value & Range("G1").Value = Range("C2").Value & Range("D2").Value & Range("E2").Value & Range("F2").Value & Range("G2").Value Then
IsEqual = True
Else
IsEqual = False
End If
End Function
Rgds,