I have an excel workbook which stores Employee data. It has 3 sheet which has data coming from 3 different sources. All the 3 sheet has the Employee ID column as common which is ideally the first column.
Now I am looking for a formula which could find Employee ID which are present on all 3 sheets and list down in the master sheet in the same workbook preferably in Column1. I am not looking for Unique or Distinct Employee ID's but one's which are present on all these 3 sheets.
Compulsorily the Employee ID has to be on all the 3 sheets then only should appear in the Master sheet. How can i achieve that?

Every time I manually copy paste the employee ids in Master sheet and then do a vlookup on all 3 sheet and then i extract the one's which appear on all the 3 sheets and delete the rest. This take sometime. Now I am looking for formula which can do that for me. Compare, search and then list down.
Try using the following formula:
• Formula used in cell A1 --> Method 1
Or, If applicable can use
GROUPBY()--> Exclusively ApplicableMS365Office Insiders Version. Method 2:Note: When placing the formula in the cell the
*inTOCOL()function will automatically change toTOCOL(Sheet1:Sheet3!A:A,1)Or, Can use
BYROW()function - Method 3:Explanations about the formula logic:
LET()function, helps in eliminating redundant calculations, avoids using repeated formulas/ranges and improves working functionalities of Excel by performance._Storesvariable is the source ranges from all the three sheets, in the example it usesTOCOL()function with an optional argument[ignore]-->1 - ignore blanksas we are taking the whole columnA:Afrom all the sheets, we are excluding the empty cells if any. This stacks one upon the other into a single array.UNIQUE()function, extracting each unique values._Countsvariable uses anMMULT()function which does a matrix product of two arrays. The output is an array of counts.FILTER()function toincludethose which have counts equal to3and lastly usingSORT()function to return anA-Zsorted data.The algorithm remains same for the other two following formulas provided, the second uses a
GROUPBY()function which isBeta/Office InsiderVersion, one needs to enable it while usingMS365and writing the above, it is bit shorter, and the last method uses aLAMBDA()helper function calledBYROW()which does custom logical calculations per row in an array and returns one result per row as an array.The basic logic remains same, stack all the data into one, then get the uniques, do the counts and keep only those which are all present in the three stores.
This can also be accomplished using
Power Query, available inWindows Excel 2010+andExcel 365 (Windows or Mac)To use Power Query follow the steps:
Table1,Table2andTable3Notes: The second step in the
Power Query, I am only taking the tables from the three sheets and not the table which will be an output in the Master Sheet, hence excluding it or filtering it out. So, when you name theTablesand while pasting theM-Codedo exclude output query, otherwise whenever you add new data and refresh the imported table in theMaster Sheetit will keep duplicating the desired output.However, in the above formulas if you don't have access to
TOCOL()function then you can replace that part with the following, but it has a drawback, since it usesFILTERXML()andTEXTJOIN(), the former will not work on web version ofExcelif you happen to use it, and the later has character limitations -->32767 characters (cell limit)which when reached will return#VALUE!error, but with the existing example it works without any issue.