COUNTIFS with OR

I am trying to create a function using COUNTIFS with an OR function and am struggling to find an answer to my issue. I've tried using the AI formula generator and have searched through here for answers but none have been successful.

I need a formula that will flag rows that have the same value in column 1 and column 2 OR has the same value in column 3. I am trying to flag rows with the same for first and last name OR the same email.

Right now I have this formula:

=IF(OR(COUNTIF(Email:Email, Email@row) > 1, 1, 0), IF(COUNTIFS([First Name]:[First Name], [First Name]@row, [Last Name]:[Last Name], [Last Name]@row) > 1, 1, 0))

However, this formula is flagging rows that have an email but no first name and last name.

Answers

  • Shimanta Roy
    Shimanta Roy ✭✭✭✭

    I believe what you want to achieve here doesn't require a OR function. Could you check the following one?

    =IF(COUNTIF(Email:Email, Email@row) > 1, 1, IF(COUNTIFS([First Name]:[First Name], [First Name]@row, [Last Name]:[Last Name], [Last Name]@row) > 1, 1, 0))

  • Unfortunately, I'd already tried this one. It causes rows with only an email and rows only with first and last name to be flagged. Not duplicates

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!