In the module for sheet1, you can write the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 And Target.Column <= 5 Then ' 3 to 5 stand for
to E columns
For i = 1 To Target.Row - 1
If (Cells(i, 3) = Cells(Target.Row, 3)) And (Cells(i, 4)
Cells(Target.Row, 4)) And (Cells(i, 5) = Cells(Target.Row, 5)) Then
MsgBox "Duplicate record"
End If
Next
End If
End Sub
- Manges
--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile:
http://www.excelforum.com/member.php...fo&userid=1047
View this thread:
http://www.excelforum.com/showthread.php?threadid=27585