Dim
Wks1
As
Worksheet
Dim
lngCounterColum
As
Long
Dim
lngCounterRow_Clean
As
Long
Dim
lngCounterRow_FileAll
As
Long
Dim
CkeckBit
As
Boolean
Dim
EndRow_Clean
As
Long
Dim
EndColumn_Clean
As
Long
Dim
EndRow_FileAll
As
Long
Dim
EndColumn_FileAll
As
Long
Dim
error
As
Integer
Dim
OK
As
Integer
Dim
Row
As
Long
Dim
ColumnART
As
Long
Dim
ColumnERP
As
Long
Dim
Test1
As
String
Dim
Test2
As
String
Dim
FindString
As
String
Dim
Rng
As
Range
Dim
Cell
As
String
Sub
Search()
For
Wks = 1
To
Worksheets.Count
If
Worksheets(Wks).Name =
"PDM_Daten"
Then
Set
Wks_Clean = Sheets(
"PDM_Daten"
)
Set
Wks_FileAll = Sheets(
"fileAll00-0F"
)
With
Wks_Clean
EndRow_Clean = .Cells(Rows.Count, 2).
End
(xlUp).Row
EndColumn_Clean = .Cells(2, Columns.Count).
End
(xlToLeft).Column
End
With
With
Wks_FileAll
EndRow_FileAll = .Cells(Rows.Count, 4).
End
(xlUp).Row
EndColumn_FileAll = .Cells(2, Columns.Count).
End
(xlToLeft).Column
End
With
For
lngCounterRow_Clean = 1
To
EndRow_Clean
FindString = Wks_Clean.Cells(lngCounterRow_Clean, 2).Value
If
Trim(FindString) <>
""
Then
With
Wks_FileAll.Range(
"D:D"
)
Set
Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=
False
)
If
Not
Rng
Is
Nothing
Then
Cell = Rng.Address
Cell = Right(Cell, Len(Cell) - 3)
Wks_FileAll.Cells(Cell, 20).Value =
"X"
Wks_FileAll.Cells(2, 21).Value = lngCounterRow_Clean
End
If
End
With
End
If
Next
lngCounterRow_Clean
Application.ScreenUpdating =
False
End
If
Next
Wks
Exit
Sub
End
Sub