Dim
sht
As
Worksheet
Dim
fnd
As
String
, fnd1
As
String
, fnd2
As
String
Dim
rplc1
As
String
, rplc2
As
String
Dim
c, firstAddress
fnd =
"XY"
fnd1 =
"X"
: rplc1 =
"A"
fnd2 =
"Y"
: rplc2 =
"B"
Set
sht = Sheets(
"Datenbasis"
)
With
sht.Columns(
"B:B"
)
Set
c = .Find(fnd, LookIn:=xlValues)
If
Not
c
Is
Nothing
Then
firstAddress = c.Address
Do
With
c.Offset(0, 3)
.Value = Replace(.Value, fnd1, rplc1)
.Value = Replace(.Value, fnd2, rplc2)
End
With
Set
c = .FindNext(c)
Loop
While
Not
c
Is
Nothing
And
c.Address <> firstAddress
End
If
End
With