A single "=" is an assignment. In order to do a comparison, use "==" a double equal sign. You could also nest these individual if statements with: if [DUPLICATE] == "0": output = replace( [DUPLICATE], "0", "CATEGORY 1") elif [DUPLICATE] == "1": output = replace( [DUPLICATE], "1", "CATEGORY 2") ....
Firstly, you need to decide if you want to use VBScript or Python. You started with almost functional VBScript and have been slowly drifting into functional Python.