EXCEL2007中,D3:Z是数据区,我想在A1单元格输入几个值,每个值用英文逗号分隔,在B1单元格设置公式,如果

2024-11-22 04:15:15
推荐回答(3个)
回答1:

=--AND(COUNTIF(D3:Z3,MID(SUBSTITUTE(A1,",",REPT(" ",99)),ROW($1:$5)*99-98,99)))
数组公式,输入时按ctrl+shift+enter完成.
公式假设A1中最多有5个数字,且总长度不超过99.如果不是请根据需要修改.

回答2:

在B1输入:
=IF(COUNT(0/COUNTIF(D3:Z3,--MID(SUBSTITUTE(A1,"、",REPT(" ",100)),ROW($1:$100)*100-99,100)))=LEN(A1)-LEN(SUBSTITUTE(A1,"、",""))+1,1,)
按CTRL+SHIFT+ENTER结束

回答3:

=IF(OR(A1=D3:Z3),1,0)