- Hot Topics
Excel Alert Duplicate Data
Dear all. I have this code Code: Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False Dim myRange As Range, myCell As Range Dim EntValue Dim NewValue As Double, iMult As Double Dim rCount As Long, iCount As Long, tCol As Long, myValueCount As Lo tCol = Target.Column iCount = Empty On Error Resume Next iCount = Selection.Count On Error GoTo 0 If iCount = 1 Then If tCol = 1 Then Set myRange = Columns(Target.Column) If Not Application.Intersect(myRange, Range(Target.Address)) Set myCell = Range(Target.Address) EntValue = myCell.Value myValueCount = Application.WorksheetFunction.CountIf(myR If myValueCount > 1 Then MsgBox "you have already enter " & EntValue & " at t End If End If ElseIf tCol = 2 Then Set myRange = Columns(Target.Column)
This question generated 23 answers. To proceed to the answers, click here.
This thread is current as of September 9, 2014.
For more resources for Microsoft Excel:
This article includes the following tags:
- Microsoft Excel