Forum Discussion

pbexpresss's avatar
pbexpresss
Copper Contributor
Oct 01, 2021
Solved

Compare Two Columns

I have a list of employees who submitted their daily reports.  I need to compare this list with the complete employee roster to determine which employees did not submit their daily report.  How can I...
  • bosinander's avatar
    bosinander
    Oct 02, 2021

    pbexpresss Hi. Assuming Excel 365, this is a way

    XMATCH looks for all names among those reported.

    ISERROR becomes true if they are not in the list of reported hours

    FILTER shows all names that have not reported

     

    =FILTER(G2:G6;ISERROR(XMATCH(G2:G6;A2:A4)))

     

     

    Change G2:G6 to range in your workbook with all names.

     

    Using the function LET makes it easier to read and test the different parts.

    Last line is what the cell outputs and changing "output" to eg haveReport shows that part of the calculation.

    I prefer to have the definitions indented.

     

    =LET(allNames;G2:G6;
             reportedNames;A2:A4;
    haveReported;XMATCH(allNames;reportedNames);
    haveNotReported;ISERROR(haveReported);
    output;FILTER(allNames;haveNotReported);
    output
    )