Hallo Holger,
sry das ich nochmal störe....
Gibt es auch eine Möglichkeit die erste Spalte von Zeile 15 bis 95 auf Duplikate zu untersuchen ?
Hab es so versucht, jedoch ohne Erfolg...
Sub Transfer_Gantt_MSTA_KW()
Dim szStr As String
Dim a As Integer
Dim i As Integer
Dim intr1 As Integer, intr2 As Integer, Suchspalte As Integer,
a = 15
For i = 15 To 95
If Sheets("P3_Gantt_Daten").Cells(i, 3).Value = "Meilenstein" Then
Sheets("P3_MSTA_Daten_KW").Cells(a, 2).Value = Sheets("P3_Gantt_Daten").Cells(i, 2).Value
Sheets("P3_MSTA_Daten_KW").Cells(a, 1).Value = Sheets("P3_Gantt_Daten").Cells(i, 9).Value
a = a + 1
End If
Next i
Suchspalte = 1
For intr = 15 To Sheets("P3_MSTA_Daten_KW").Cells(Rows.Count, 1).End(xlUp).Row
If Cells(intr1, Suchspalte) = Cells(intr2, Suchspalte) Then
MsgBox Cells(intr1, Suchspalte).Value & " ist doppelt vorhanden "
End If
Next intr2
Next intr1
End Sub
|