Put two worksheets in one window, as shown in the figure: sheet1 is for all students, and sheet2 is the names of students in a certain class.
Input =if (countif()) in the blank space of the same line corresponding to the name in sheet1
Then switch to sheet2, select all the names and press Enter
Switch to sheet1 again, then the function becomes =if(countif(Sheet2!A1:A44))
Note: In this step, add the symbol $,=if(countif(Sheet2!$A$1: $A$44))
Finally, complete the function =if(countif(Sheet2!$A$1:$A$44,A2),"S","F"), after the input is completed , press Enter, the ones shown as S are students in this class, and those shown as F are not. Then pull down the fill from this row, and all students can be filtered.
Recommended related tutorials: excel tutorial
The above is the detailed content of How to filter the same data in two tables in excel. For more information, please follow other related articles on the PHP Chinese website!