Using Find with COUNTIFS

j.cantwell
j.cantwell ✭✭
edited 09/14/21 in Formulas and Functions

I am trying to create a formula that references another sheet and counts how many times the name "James Comito" appears in column A and B if column C is marked as "PSG".

Here is the formula I have, when I split it up into two separate formulas, it works, but when I combine I get incorrect argument.

=COUNTIFS({ARG/PSG Project Tracker Range 5}, FIND("James Comito", @cell) > 0, {ARG/PSG Project Tracker Range 2}, "PSG")

Any suggestions?

Follow up to above post -

After reading other posts, I think it is because of the multiple cell reference in one instance but not in the other. I got this formula to work

=COUNTIFS({ARG/PSG Project Tracker Range 1}, FIND("James Comito", @cell) > 0, {ARG/PSG Project Tracker Range 2}, "PSG", {ARG/PSG Project Tracker Range 3}, 0) + COUNTIFS({ARG/PSG Project Tracker Range 4}, FIND("James Comito", @cell) > 0, {ARG/PSG Project Tracker Range 2}, "PSG", {ARG/PSG Project Tracker Range 3}, 0)


My follow up question is I need to do countifs for when "PSG" also says "SME", "ARG", or "NLT", is there a way to somehow combine "PSG, SME, ARG, NLT" so I don't have to keep repeating +countifs ?


Thank you for your help!

Answers

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭

    Hey @j.cantwell

    Try this

    =COUNTIFS({ARG/PSG Project Tracker Range 1}, FIND("James Comito", @cell) > 0, {ARG/PSG Project Tracker Range 2}, OR(@cell="PSG", @cell="SME", @cell="ARG", @cell="NLT"), {ARG/PSG Project Tracker Range 3}, 0) + COUNTIFS({ARG/PSG Project Tracker Range 4}, FIND("James Comito", @cell) > 0, {ARG/PSG Project Tracker Range 2}, OR(@cell="PSG", @cell="SME", @cell="ARG", @cell="NLT"), {ARG/PSG Project Tracker Range 3}, 0)

  • This worked, thank you!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!