E2公式数组公式,输入完成后不要直接回车,要按三键 CTRL+SHIFT+回车 结束。
=MAX(IF(COUNTIF(B2:D2,B2:D2)>1,B2:D2,""))
以上公式当没有重复时显示空白,如果要显示为 无重复,公式改为:
=MAX(IF(COUNTIF(B2:D2,B2:D2)>1,B2:D2,"无重复"))
也可以用这公式,这是普通公式,输入完成后直接回车即可,无需再按三键:
=IF(COUNTIF(B2:D2,B2)>1,B2,IF(COUNTIF(B2:D2,C2)>1,C2,IF(COUNTIF(B2:D2,D2)>1,D2,"")))
显示无重复
=IF(COUNTIF(B2:D2,B2)>1,B2,IF(COUNTIF(B2:D2,C2)>1,C2,IF(COUNTIF(B2:D2,D2)>1,D2,"无重复")))
看了你这个才知道之前那个问题理解错了,你应该写明“这儿出现重复的是1、2”,这样就清晰很多,将下面的公式复制过去吧
=CONCATENATE(IF(LEN(B2&C2&D2)-LEN(SUBSTITUTE(B2&C2&D2,1,""))>1,"1",""),IF(LEN(B2&C2&D2)-LEN(SUBSTITUTE(B2&C2&D2,2,""))>1,"2",""),IF(LEN(B2&C2&D2)-LEN(SUBSTITUTE(B2&C2&D2,3,""))>1,"3",""),IF(LEN(B2&C2&D2)-LEN(SUBSTITUTE(B2&C2&D2,4,""))>1,"4",""),IF(LEN(B2&C2&D2)-LEN(SUBSTITUTE(B2&C2&D2,5,""))>1,"5",""),IF(LEN(B2&C2&D2)-LEN(SUBSTITUTE(B2&C2&D2,6,""))>1,"6",""),IF(LEN(B2&C2&D2)-LEN(SUBSTITUTE(B2&C2&D2,7,""))>1,"7",""),IF(LEN(B2&C2&D2)-LEN(SUBSTITUTE(B2&C2&D2,8,""))>1,"8",""),IF(LEN(B2&C2&D2)-LEN(SUBSTITUTE(B2&C2&D2,9,""))>1,"9",""),IF(LEN(B2&C2&D2)-LEN(SUBSTITUTE(B2&C2&D2,0,""))>1,"0",""))