I need help with a formula.

Dakota
Dakota ✭✭
edited 08/10/21 in Formulas and Functions

I have 2 sheets. Both sheets have dates and names. I need to compare the names, if both match then I need to compare dates, if they match I need to return a 1 to check a box. How do I go about writing this?

Best Answer

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭
    edited 08/10/21 Answer βœ“

    Hi @Dakota

    please try the following formula:

    =IFERROR(IF(OR([Name 1]@row = "", [Date 1]@row = ""), 0, IF(COUNTIFS({Name 2},
    @cell = [Name 1]@row, {Date 2}, @cell = [Date 1]@row) > 0, 1)), "")
    

    the following screenshot shows the result:

    Main Sheet

    Second Sheet:


    PMP Certified

    bassam.khalil2009@gmail.com

    β˜‘οΈ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

Answers

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭
    edited 08/10/21 Answer βœ“

    Hi @Dakota

    please try the following formula:

    =IFERROR(IF(OR([Name 1]@row = "", [Date 1]@row = ""), 0, IF(COUNTIFS({Name 2},
    @cell = [Name 1]@row, {Date 2}, @cell = [Date 1]@row) > 0, 1)), "")
    

    the following screenshot shows the result:

    Main Sheet

    Second Sheet:


    PMP Certified

    bassam.khalil2009@gmail.com

    β˜‘οΈ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

  • Dakota
    Dakota ✭✭

    Thank you,

    After adding a reference sheet it worked perfectly.


    Thank you,

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭

    @Dakota

    Excellent, I will be happy to help you any time

    PMP Certified

    bassam.khalil2009@gmail.com

    β˜‘οΈ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!