Excel怎么用函数公式筛选特定项对应的数据?

2024-11-06 01:26:52
推荐回答(5个)
回答1:

在sheet2表的G6单元格中输入公式=TEXT(IFERROR(IF($C$2="中山广电网络电视费",INDEX(Sheet1!$A$1:$A$10000,SMALL(IF(Sheet1!$B$1:$B$10000<>"",ROW(Sheet1!$B$1:$B$10000),4^8),ROW(A2))),IF($C$2="房屋货款",INDEX(Sheet1!$A$1:$A$10000,SMALL(IF(Sheet1!$C$1:$C$10000<>"",ROW(Sheet1!$C$1:$C$10000),4^8),ROW(A2))),IF($C$2="电话费",INDEX(Sheet1!$A$1:$A$10000,SMALL(IF(Sheet1!$D$1:$D$10000<>"",ROW(Sheet1!$D$1:$D$10000),4^8),ROW(A2))),IF($C$2="代扣电费",INDEX(Sheet1!$A$1:$A$10000,SMALL(IF(Sheet1!$E$1:$E$10000<>"",ROW(Sheet1!$E$1:$E$10000),4^8),ROW(A2))),IF($C$2="城乡医疗征收",INDEX(Sheet1!$A$1:$A$10000,SMALL(IF(Sheet1!$F$1:$F$10000<>"",ROW(Sheet1!$F$1:$F$10000),4^8),ROW(A2))),IF($C$2="手机话费",INDEX(Sheet1!$A$1:$A$10000,SMALL(IF(Sheet1!$G$1:$G$10000<>"",ROW(Sheet1!$G$1:$G$10000),4^8),ROW(A2))),)))))),""),"YYYY年M月d日")

在sheet2表的H6单元格中输入公式=IFERROR(IF($C$2="中山广电网络电视费",INDEX(Sheet1!$B$1:$B$10000,SMALL(IF(Sheet1!$B$1:$B$10000<>"",ROW(Sheet1!$B$1:$B$10000),4^8),ROW(A2))),IF($C$2="房屋货款",INDEX(Sheet1!$C$1:$C$10000,SMALL(IF(Sheet1!$C$1:$C$10000<>"",ROW(Sheet1!$C$1:$C$10000),4^8),ROW(A2))),IF($C$2="电话费",INDEX(Sheet1!$D$1:$D$10000,SMALL(IF(Sheet1!$D$1:$D$10000<>"",ROW(Sheet1!$D$1:$D$10000),4^8),ROW(A2))),IF($C$2="代扣电费",INDEX(Sheet1!$E$1:$E$10000,SMALL(IF(Sheet1!$E$1:$E$10000<>"",ROW(Sheet1!$E$1:$E$10000),4^8),ROW(A2))),IF($C$2="城乡医疗征收",INDEX(Sheet1!$F$1:$F$10000,SMALL(IF(Sheet1!$F$1:$F$10000<>"",ROW(Sheet1!$F$1:$F$10000),4^8),ROW(A2))),IF($C$2="手机话费",INDEX(Sheet1!$G$1:$G$10000,SMALL(IF(Sheet1!$G$1:$G$10000<>"",ROW(Sheet1!$G$1:$G$10000),4^8),ROW(A2))),)))))),"")

两个公式均为数组公式,按Ctrl+Shift+Enter结束公式,使公式前后出现大括号{},拖动填充柄下拉到任意。 如图:

公式有点长!

回答2:

数量大就加辅助列,少就直接数组公式,把问题作为内容(邮件主题一定要包含“excel”,本人以此为依据辨别非垃圾邮件,以免误删),excel样表文件(把现状和目标效果表示出)作为附件发到yqch134@163.com帮你看下

回答3:

用VBA或数组公式可实现

回答4:

xlookup函数,百度一下具体用法就好了,设置一下查找条件就好了

回答5:

考虑一下数据透视吗?