Comparing Data in two Sheets

Dakota Haeffner
Dakota Haeffner ✭✭✭✭✭
edited 02/13/23 in Formulas and Functions

Hello,

I have a large list of 926 individuals who are identified by IDs in one sheet. some of these individuals are no longer active. I am trying to find a simple solution to compare the individuals in one sheet to the 3+ separate Rosters that hold the active individuals in other sheets.

Basically, if they are in a the large list but not in the individual rosters they are inactive and I can remove them from the larger list.

I have no problem setting up additional helper sheets/columns for formulas. I just need to figure out who is inactive on this large list.

Thank you for any ideas!

Tags:

Best Answers

  • Jonathan Gann
    Jonathan Gann ✭✭✭
    Answer ✓

    It may be a complicated formula to write, but you could conceivably run a COUNT(COLLECT( or INDEX(MATCH( on each sheet's references to determine if they exist in the other lists. For instance:

    Column 1 is the employee IDs

    Reference 1,2,3,etc is the employee IDs column in roster doc 1,2,3,etc

    =IF( ( IFERROR( INDEX( {Reference 1} , MATCH( [Column 1]@row , {Reference 1} , 0 ) ), "" ) +(repeat previous section for Reference 2,3,etc) )="","Inactive","Active")

    Each section (in italics) will return a blank through IFERROR if there's no results found, and if all of the nested INDEX/MATCH functions return zero results, it should all equal a null value "" and let you label them as inactive via the bolded wrap. Otherwise, it returns the Active label.

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    You would need to write out 3 separate COUNTIFS (one for each of the three active rosters). Adding them together and then saying if the total is equal to zero (meaning the id was not found in any of the three sheets), flag as "Inactive".


    =IF(COUNTIFS({Sheet 1 ID Column}, @cell = [ID Column]@row) + COUNTIFS({Sheet 2 ID Column}, @cell = [ID Column]@row) + COUNTIFS({Sheet 3 ID Column}, @cell = [ID Column]@row) = 0, "Inactive")

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!