如果单词在列中出现的次数超过五次,则不允许用户输入该单词

Do not allow a user to enter the word if number of occurrences of the word in a column exceeds five

如果某列中的单词出现次数已超过五次,如何防止用户输入该单词?

换句话说,如何限制单词的出现次数?

如果相关列是 D,select 它,数据,验证...,单元格范围:D:D,条件:自定义公式是

 =countif(D:D1,D1)<6  

关于无效数据:拒绝输入,保存