Option
Explicit
Sub
Example()
Dim
rngCipher
As
Excel.Range
Dim
rngResult
As
Excel.Range
With
Worksheets(
"Textsuche"
)
Set
rngCipher = .Range(
"F2"
)
Do
While
Trim$(rngCipher.Value) <>
""
Set
rngResult = .Columns(
"A"
).Find(rngCipher.Value, , xlValues, xlWhole, xlByColumns)
If
Not
rngResult
Is
Nothing
Then
.Cells(rngCipher.Row,
"H"
).Value = .Cells(rngResult.Row,
"D"
).Value
Else
.Cells(rngCipher.Row,
"H"
).Value = CVErr(XlCVError.xlErrNA)
End
If
Set
rngCipher = rngCipher.Offset(1)
Loop
End
With
End
Sub