[b]Option Explicit
Sub Daten_prüfen()
Dim iDat1 As Long, iDat2 As Long, firstRow As Long
Dim wks1 As Worksheet, wks2 As Worksheet
Application.ScreenUpdating = False
Set wks1 = Workbooks("Datei1.xls").Sheets("Tabelle1")
Set wks2 = Workbooks("Datei2.xls").Sheets("Tabelle2")
For iDat1 = 4 To wks1.Range("A65536").End(xlUp).Row
For iDat2 = 4 To wks2.Range("B65536").End(xlUp).Row
If wks1.Cells(iDat1, 1) = wks2.Cells(iDat2, 2) Then
wks2.Cells(iDat2, 4) = wks1.Cells(iDat1, 3)
GoTo Weiter
End If
Next
firstRow = wks2.Range("B65536").End(xlUp).Offset(1, 0).Row
With wks2
.Cells(firstRow, 2) = wks1.Cells(iDat1, 1)
.Cells(firstRow, 4) = wks1.Cells(iDat1, 3)
.Cells(firstRow, 4).Font.ColorIndex = 3
.Cells(firstRow, 4).Font.Bold = True
End With
Weiter:
Next
End Sub[/b][b]Set wks1 = Workbooks("Datei1.xls").Sheets("Tabelle1")
Set wks2 = Workbooks("Datei2.xls").Sheets("Tabelle2")[/b]
symbolleisten in excel
luisa 14.01.2007 - 253 Hits - 4 Antworten
Excel - Symbolleiste speichern - Datei excel*.xlb fehlt
a_wurm 07.08.2007 - 237 Hits - 2 Antworten
Import von Excel nach Excel ohne Öffnen der Quelldatei
JamesBrown 29.10.2007 - 434 Hits - 3 Antworten
Excel 2002 Dateien in Excel 2007 für MS Vista Home Premium
1tiggy 09.11.2007 - 180 Hits - 5 Antworten
Absturz von Powerpoint UND Excel
RalfH 22.11.2007 - 144 Hits -