I would start with something small that you know works and build from there. Make sure when you post code, enclose it in code blocks b/c I'm not sure if I'm allowed to respond... depends on the forum (but they all have code blocks people prefer to use).
Below, I didn't pay much attention to the Replace Method's arguments, but I restructured the code to loop through the entire column B.
Sub FindReplace()
Dim sht As Worksheet
Dim fnd3 As Variant
Dim rplc3 As Variant
Dim cat As String, rngCAT as Range, rngX as Range
'cat = Range(B).Value 'I don't think this makes sense. Range(B) looks like (if it works/was modified to work), would not return just one string.
cat = "SALAME" 'Instead, I'll make this the string you search for
'Also, it looks like you never defined sht -- so I'm going to assume it's called "Sheet1"
Set sht = ThisWorkbook.Worksheets("Sheet1")
Set rngCAT = sht.Range("B1").EntireColumn
'/Save a little time by reducing the column to no larger than the used range
Set rngCAT =Intersect(rngCAT,sht.UsedRange) 'Untested
fnd3 = "AURORA ALIM."
rplc3 = "AURORA"
For Each rngX in rngCAT
If Instr(rngX.Value,cat)>0 then
Call rngX.Offset(0,2).Replace(what:=find3,Replacement:=rplc3,LookAt:=xlPaart,MatchCase:=False,SearchFormat:=False,ReplaceFormat:=False)
End If
Next rngX
End Sub
...no debugging has been done to the above code.
Note: Re-Edited about 10 min after original post to execute your replacement method if the row in column B contains (rather than =) the string stored in cat.
Bookmarks