Excel函数足以让人震撼的单条件查找方法
查找是一热门话题,方法也很多,不过如果要一次性用20种方法,对很多人来说是一种挑战,有谁愿意来挑战一下呢?
左边的表格为数据源,右边为查询表,根据名字查询随机人员。
1. =LOOKUP(1,0/(G2=$A$2:$A$7),$B$2:$B$7)
2. =VLOOKUP(G2,$A$2:$B$7,2,)
3. =INDEX($B$2:$B$7,MATCH(G2,$A$2:$A$7,))
4. =OFFSET($B$1,MATCH(G2,$A$2:$A$7,),,)
5. =INDIRECT("R"&MATCH(G2,$A$2:$A$7,)+1&"C2",)
6. =INDIRECT("B"&MATCH(G2,$A$2:$A$7,)+1)
7. =SUM(IF(G2=$A$2:$A$7,$B$2:$B$7)) 数组公式
8. =SUM(($A$2:$A$7=G2)*$B$2:$B$7) 数组公式
9. =CHOOSE(MATCH(G2,$A$2:$A$7,),$B$2,$B$3,$B$4,$B$5,$B$6,$B$7)
10. =SUMIF($A$2:$A$7,G2,$H$2:$H$7)
11. =SUMPRODUCT(--($A$2:$A$7=G2),$B$2:$B$7)
12. =SUMPRODUCT(($A$2:$A$7=G2)*$B$2:$B$7)
13. =MAX(($A$2:$A$7=G2)*$B$2:$B$7) 数组公式
14. =MAXA(($A$2:$A$7=G2)*$B$2:$B$7) 数组公式
15. =MIN(IF($A$2:$A$7=G2,$B$2:$B$7)) 数组公式
16. =PRODUCT(IF($A$2:$A$7=G2,$B$2:$B$7))