以下公式有没有简单的表达方式?
单元格内敲入下面的公式,太繁琐。从黄色的Z3到Z26,其余的都一样,有没有简单的表达方式?类似于从Z3到Z26循环之类的?
=IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z3),"",Z3&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z4),"",Z4&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z5),"",Z5&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z6),"",Z6&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z7),"",Z7&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z8),"",Z8&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z9),"",Z9&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z10),"",Z10&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z11),"",Z11&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z12),"",Z12&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z13),"",Z13&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z14),"",Z14&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z15),"",Z15&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z17),"",Z17&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z18),"",Z18&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z19),"",Z19&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z20),"",Z20&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z16),"",Z16&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z21),"",Z21&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z22),"",Z22&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z23),"",Z23&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z24),"",Z24&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z25),"",Z25&",")&IF(COUNTIF(INDIRECT({"h9:j9","e10:g10","i10:n10","s10:w10"}),Z26),"",Z26&",") 能上传附件吗? 这个不需要附件吧,只是觉着公式这么写太复杂。直接拷贝,粘贴到EXCEL即可。
或者,再简化一下,以下的单元格公式有没有简化的表达方式。
其实就是看看Z3到Z26单元格的数值有没有在A1到A10出现过,如果出现,就显示Z单元格的值,如果没有出现,就不显示。
=IF(COUNTIF(A1:A10,Z3),"",Z3&",")
&IF(COUNTIF(A1:A10,Z4),"",Z4&",")
&IF(COUNTIF(A1:A10,Z5),"",Z5&",")
&IF(COUNTIF(A1:A10,Z6),"",Z6&",")
&IF(COUNTIF(A1:A10,Z7),"",Z7&",")
&IF(COUNTIF(A1:A10,Z8),"",Z8&",")
&IF(COUNTIF(A1:A10,Z9),"",Z9&",")
&IF(COUNTIF(A1:A10,Z10),"",Z10&",")
&IF(COUNTIF(A1:A10,Z11),"",Z11&",")
&IF(COUNTIF(A1:A10,Z12),"",Z12&",")
&IF(COUNTIF(A1:A10,Z13),"",Z13&",")
&IF(COUNTIF(A1:A10,Z14),"",Z14&",")
&IF(COUNTIF(A1:A10,Z15),"",Z15&",")
&IF(COUNTIF(A1:A10,Z17),"",Z17&",")
&IF(COUNTIF(A1:A10,Z18),"",Z18&",")
&IF(COUNTIF(A1:A10,Z19),"",Z19&",")
&IF(COUNTIF(A1:A10,Z20),"",Z20&",")
&IF(COUNTIF(A1:A10,Z16),"",Z16&",")
&IF(COUNTIF(A1:A10,Z21),"",Z21&",")
&IF(COUNTIF(A1:A10,Z22),"",Z22&",")
&IF(COUNTIF(A1:A10,Z23),"",Z23&",")
&IF(COUNTIF(A1:A10,Z24),"",Z24&",")
&IF(COUNTIF(A1:A10,Z25),"",Z25&",")
&IF(COUNTIF(A1:A10,Z26),"",Z26&",") 如果是 office2019及更高版本或WPS,可以用 CONCAT/TEXTJOIN,否则没有。 写一下公式吧,我还不会用,谢谢 =TEXTJOIN(",",,IF(COUNTIF(A1:A10,Z3:Z26),"",Z3:Z26))
没附件,你自己验证吧。
页:
[1]