Sub compareRange()
If Worksheets("Sheet1").Range("A14:C14") = Worksheets("Sheet1").Range("A15:C15") Then
MsgBox "Two Ranges are the same"
End If
'MsgBox "Two Ranges are the same"
End Sub
A14:C14(1,2,3) と A15:C15(1,2,3) の値が同じであるため、型の不一致エラーが発生します。このような2つの範囲を比較するにはどうすればよいですか?