AW: mein Beitrag von vorhin...
14.10.2003 16:25:26
Hajo_Zi
Hallo Ape
mir scheint Du hast nicht mal versucht den Code nachzuvollziehen.
Sub Tabellen_Vergleichen2()
' erstellt von Hajo.Ziplies@web.de 23.09.03
' http://home.media-n.de/ziplies/
' 2 Tabellen vergleichen und in Tabelle2 kennzeichnen
' Tabelle1 Original Spalte A, Tabelle 2 Kopie Spalte B
' alle Werte die von Tabelle1 in Tabelle2 vorhanden sind sollen gekennzeichnet werden in Tabelle 2
Dim LoI As Long
Dim LoJ As Long
Dim LoLetzte1 As Long
Dim LoLetzte2 As Long
LoLetzte1 = 65536
With Worksheets("Tabelle1")
If .Range("A65536") = "" Then LoLetzte1 = .Range("A65536").End(xlUp).Row
End With
LoLetzte2 = 65536
With Worksheets("Tabelle2")
If .Range("B65536") = "" Then LoLetzte2 = .Range("B65536").End(xlUp).Row
End With
For LoI = 1 To LoLetzte1
For LoJ = 1 To LoLetzte2
If Worksheets("Tabelle1").Cells(LoI, 1) = Worksheets("Tabelle2").Cells(LoJ, 1) _
And Worksheets("Tabelle1").Cells(LoI, 2) = Worksheets("Tabelle2").Cells(LoJ, 2) Then
Worksheets("Tabelle2").Cells(LoJ, 3).Interior.ColorIndex = "vorhanden"
End If
Next LoJ
Next LoI
End Sub
Falls Code vorhanden wurde dieser getestet unter Betriebssystem XP Pro und Excel Version XP SBE.
Bitte kein Mail, Probleme sollen im Forum gelöst werden.
Microsoft MVP für Excel
Das Forum lebt auch von den Rückmeldungen.
http://home.media-n.de/ziplies/