I think that formula works OK, it isn't dependent on the values being numeric - 1 is the correct result for each of those criteria, isn't it? What results do you expect?