View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dan E[_3_] Dan E[_3_] is offline
external usenet poster
 
Posts: 53
Default Need help with IF statement ! ! !

CODE SHOULD BE:

Dim master As Range
Dim ind As Range
Set master = Range("B18")
Set ind = Range("C18")

If master.Value = ind.Value Then
MsgBox "Sagregation is OKEY"
Else: MsgBox "Please check the details again. There is an error"
End If

End Sub

AND

If Range("B18").Value = Range("C18").Value Then
MsgBox "Segregation is OK"
Else: MsgBox "Please check the details again, there is an error"
End If

Got the B's and C's a little mixed up...

Dan E