Actually, that is very odd, since as written (with the error) it should return "duplicate" for every cell.
Change the 0 to a 1 and I\it should work fine with text. (Unless it is dates or numbers formatted as text).
Did you drag it down so the formula in C2 is =IF(COUNTIF(B:B, B2)>1,"Duplicate","")