I looked at Replace - but that won't work because you have multiple columns
The best I can come up with is creating a calculated dimension - in my case I called it "Clean"
Here is the formula:
if {Color} = "BLACK" and {Name} = "XYZ" and {Size} = 39 then "890211100001" else {Code}
Here are the results:
If I have time I'll try to document in a document the steps.