How to compare data in two sheets

Widner, Caitlin 0 Reputation points
2026-11-24T13:05:07.0866667+00:00

I have two excel sheets that both contain form results. One is a sign up form and one is a parent contact form. I would like to compare the results between sheets so that it automatically shows if a parent has completed the contact form.

Microsoft 365 and Office | Excel | For education | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Kristen Tran 3,230 Reputation points Independent Advisor
    2026-11-24T13:35:05.3166667+00:00

    Hi Widner,

    You can compare the two worksheets by adding a status column to the SignUp sheet and using COUNTIF to check whether each parent's email also appears in the ParentContact sheet.

    Since the parent email address is in column B on both sheets, enter the following formula in the first status cell, for example C2 on the SignUp sheet:

    =IF(B2="","",IF(COUNTIF(ParentContact!$B:$B,B2)>0,"Completed","Not completed"))

    Then fill the formula down the column.

    The formula will return:

    • Completed if the email in B2 is found in column B of the ParentContact sheet.
    • Not completed if the email is not found.
    • A blank result if B2 itself is blank.

    If the worksheet name contains a space, for example Parent Contact, enclose the sheet name in single quotation marks:

    =IF(B2="","",IF(COUNTIF('Parent Contact'!$B:$B,B2)>0,"Completed","Not completed"))

    If you also want this status formula to be applied automatically as new sign-up responses are added, consider converting the SignUp response range to an Excel Table by selecting the data and pressing Ctrl+T. This allows the calculated column to extend to newly added rows automatically.

    If an email appears on both sheets but still shows Not completed, check the values for extra spaces or nonprinting characters. You can create a helper column on both sheets using:

    =LOWER(TRIM(CLEAN(B2)))

    Then use the cleaned email values for the comparison.

    I hope this helps you keep track of which parents have completed the contact form more easily. Should you have any further questions, please feel free to let me know.

    Best regards,

    Was this answer helpful?


  2. AI answer

    2026-11-24T13:05:38.56+00:00

    Add a status column to the sign-up sheet and use COUNTIF to check whether each parent’s unique identifier—preferably email address or another ID—appears on the contact-form sheet.

    Set up the comparison

    Assume:

    • SignUp sheet: parent email is in column B.
    • ParentContact sheet: parent email is also in column B.
    • The first response is on row 2.

    In a new Contact form status column on the SignUp sheet, enter this in row 2:

    =IF(B2="","",IF(COUNTIF(ParentContact!$B:$B,B2)>0,"Completed","Not completed"))
    

    Then copy or fill the formula down.

    COUNTIF(range, criteria) counts how many cells in the contact-form range match the email in the current sign-up row. Any count greater than zero returns Completed.^1^

    Change:

    • B2 to the cell containing the identifier on the SignUp sheet.
    • ParentContact!$B:$B to the column containing that same identifier on the ParentContact sheet.
    • If the sheet name contains spaces, use single quotation marks:
    =IF(B2="","",IF(COUNTIF('Parent Contact'!$B:$B,B2)>0,"Completed","Not completed"))
    

    As new form results appear in the referenced column, the status formula will evaluate them. Fill the formula far enough down the SignUp sheet for future sign-ups.

    Choose a reliable matching field

    Use a value that is expected to identify one family or submission uniquely, such as:

    • Parent email address
    • Student or registration ID
    • A generated response ID

    Matching only by parent or student name can produce incorrect results when two people share the same name.

    If no single field is unique, match two fields with COUNTIFS. For example, if column A contains the student ID and column B contains the parent email:

    =IF(OR(A2="",B2=""),"",IF(
     COUNTIFS(ParentContact!$A:$A,A2,ParentContact!$B:$B,B2)>0,
     "Completed",
     "Not completed"))
    

    COUNTIFS applies criteria across multiple ranges and counts only rows where all criteria match.^2^

    If expected matches show “Not completed”

    Check the identifiers for leading or trailing spaces and other nonprinting characters. These can prevent text from matching even when entries look identical; Microsoft recommends cleaning such data with TRIM or CLEAN.^1^

    For example, add a cleaned helper column to both sheets:

    =TRIM(CLEAN(B2))
    

    Compare the two cleaned columns instead of the original response columns.

    If the sheets are in separate workbook files, keep the source workbook open while using COUNTIF; references to calculated cells in a closed workbook can return #VALUE!.^3^


    References

    1. Use the COUNTIF function in Microsoft Excel | Microsoft Support
    2. Ways to count values in a worksheet | Microsoft Support
    3. SUMIF, COUNTIF, and COUNTBLANK functions return "#VALUE!" Error
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.