如何excel中筛选两个表中相同的数据,例如:我有一个班级的花名册,有本年级全部学生的期末成绩,想筛选这个班级全部学生的期末成绩怎么办?
excel
将两个工作表放在一个窗口中,如图所示:sheet1是全部学生的,sheet2是某班学生花名。


在sheet1相对应名字同一行的空白出输入=if(countif())

然后切换到sheet2,选中全部名字并回车

再切换到sheet1,这时这个函数变成了=if(countif(Sheet2!A1:A44))

注意:这一步时,要将字母(我们这里是A)以及数字(我们这里是1和44)前全加上符号$,=if(countif(Sheet2!$A$1:$A$44))
最后,将函数补充完=if(countif(Sheet2!$A$1:$A$44,A2),"S","F"),输入完成后,按回车,显示为S的就是这个班的学生,显示为F的就不是。再从这一行拉下填充,全部学生就可筛选完毕。

END
1
完成这个我们其实用了两个函数,第一个是if函数,if函数的标准格式是if(条件,条件为真时输出的内容,条件为假时输出的内容);第二个函数countif,它的格式是countif(全部需要比对的区域,比对内容),从我们这个countif(Sheet2!$A$1:$A$44,A2)来说,第一个参数的某班学生的全部名字,第二个参数是某个学生的名字
END
录入函数时所有的符号都要在英文状态下输入
https://jingyan.baidu.com/article/9f7e7ec05982d46f281554f3.html
网友评论