AW: Automatischer sheet Eintrag
01.04.2004 20:12:35
Beni
Hallo Cris,
Gruss Beni
https://www.herber.de/bbs/user/4870.xls
Sub Cris()
Range(Cells(2, 1), Cells(Cells(65536, 1).End(xlUp).Row, 6)).Font.ColorIndex = 0
Range(Cells(2, 1), Cells(Cells(65536, 1).End(xlUp).Row, 6)).ClearContents
For w = 2 To 5
With Sheets(w)
For z = 2 To .Cells(65536, 1).End(xlUp).Row
r = Cells(65536, 1).End(xlUp).Row + 1
sFind2 = .Cells(z, 2)
Set C = Sheets(1).Columns(2).Find(sFind2, LookIn:=xlValues, LookAt:=xlWhole)
If Not C Is Nothing Then x = 1
sFind1 = .Cells(z, 1)
Set C = Sheets(1).Columns(1).Find(sFind1, LookIn:=xlValues, LookAt:=xlWhole)
If Not C Is Nothing Then x = x + 1
If x = 2 Then
Range(C(1, 1), C(1, 6)).Font.ColorIndex = 3
C(1, w + 1) = "x"
x = ""
Else
Cells(r, 1) = .Cells(z, 1)
Cells(r, 2) = .Cells(z, 2)
Cells(r, w + 1) = "x"
End If
Next z
End With
Next w
End Sub