Hallo,
hier mal für die Spalten G bis APN, jweils jede dritte Spalte, jeweils von Zeile 2 bis Zeile 10.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Bereich1 As Range, i As Long
For i = 4 To 1099 Step 3
Select Case Target.Column
Case i
Set Bereich1 = Range(Cells(2, i), Cells(10, i))
Exit For
Case Else
'nix machen
End Select
Next i
If Target.Cells.Count > 1 Then Exit Sub
If Target.Value = "" Then Exit Sub
If Not Bereich1 Is Nothing Then
If Intersect(Bereich1, Target) Is Nothing Then Exit Sub
If WorksheetFunction.CountIf(Bereich1, Target.Value) > 1 Then
MsgBox ("Doppelter Eintrag nicht zulässig")
Application.EnableEvents = False
Target.Value = ""
Application.EnableEvents = True
Target.Select
End If
End If
Set Bereich1 = Nothing
End Sub
Gruß Werner
|