AW: Tabellenblätter vergleichen +
12.08.2005 09:14:49
Beni
Hallo Oli,
dieser Code sollte das Ergebnis bringen.
Gruss Beni
Sub Oli()
Dim Wert As Variant
Dim lz As Long
With Sheets("FG")
For i = 1 To .Cells(65536, 2).End(xlUp).Row
Wert = .Cells(i, 2)
Set c = Sheets("AR").Columns(2).Find(What:=Wert, LookIn:=xlValues, LookAt:=xlWhole)
If c Is Nothing Then
With Sheets("Tabelle2")
lz = .Cells(65536, 1).End(xlUp).Row + 1
.Cells(lz, 1) = Wert: .Cells(lz, 2) = "nur in FB vorhanden"
End With
End If
Next i
End With
With Sheets("AR")
For i = 1 To .Cells(65536, 1).End(xlUp).Row
Wert = .Cells(i, 1)
Set c = Sheets("Fg").Columns(1).Find(What:=Wert, LookIn:=xlValues, LookAt:=xlWhole)
If c Is Nothing Then
With Sheets("Tabelle2")
lz = .Cells(65536, 1).End(xlUp).Row + 1
.Cells(lz, 1) = Wert: .Cells(lz, 2) = "nur in AR Sp1 vorhanden"
End With
End If
Next i
End With
With Sheets("AR")
For i = 1 To .Cells(65536, 3).End(xlUp).Row
Wert = .Cells(i, 3)
Set c = Sheets("FG").Columns(3).Find(What:=Wert, LookIn:=xlValues, LookAt:=xlWhole)
If c Is Nothing Then
With Sheets("Tabelle2")
lz = .Cells(65536, 1).End(xlUp).Row + 1
.Cells(lz, 1) = Wert: .Cells(lz, 2) = "nur in AR Sp3 vorhanden"
End With
End If
Next i
End With
End Sub