Countifs #incorrect Argument set

Options
sravya.gupta127326
sravya.gupta127326 ✭✭✭✭✭

Hi,

please can someone help on this formula?

Program Site Range - A different sheet with multi drop down column sites

Program Phase Range - A different sheet with single drop down column

=COUNTIFS({Program Site Range}, CONTAINS($Metric@row, @cell), {Program Phase Range}, Justify$1)

If I remove the Phase criteria, it works but I need both conditions. Using Collect is giving just 1 as an answer


In the same sheet, I have these formulae working fine:

=COUNTIFS({Program Summary - Portfolio}, $Metric@row, {Program Phase Range}, Justify$1)

=COUNTIFS({Program Summary Sheet | Function}, CONTAINS($Metric@row, @cell), {Program Phase Range}, =Justify$1)


Thank you!

Thanks,

Sravya

Best Answers

  • Genevieve P.
    Genevieve P. Employee
    Answer βœ“

    Hi @sravya.gupta127326

    Cross-sheet ranges within a formula like this need to be pointing to the same sheet. The Function won't be able to compare rows between two separate sheets for two criteria, because it's looking for the criteria in the same row.

    Try adding two complete COUNTIF statements together with a + between them instead:

    =COUNTIF({Program Site Range}, CONTAINS($Metric@row, @cell)) + COUNTIF({Program Phase Range}, Justify$1)


    You also noted that you're using a Multi-Select dropdown. In this instance, you'll want to use the HAS function instead of CONTAINS. Try:

    =COUNTIF({Program Site Range}, HAS(@cell, $Metric@row)) + COUNTIF({Program Phase Range}, Justify$1)

    Let me know if this works!

    Cheers,

    Genevieve

    Need more information? πŸ‘€ | Help and Learning Center

    こんにけは (Konnichiwa), Hallo, Hola, Bonjour, OlΓ‘, Ciao!πŸ‘‹ | Global Discussions

  • sravya.gupta127326
    sravya.gupta127326 ✭✭✭✭✭
    Answer βœ“

    Hi all, thank you for your comments and thanks to @amy from Smartsheet team - looking at the manage references - I did use a separate sheet for one of the references and hence was not working when I added 2 criteria!

    Thanks,

    Sravya

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!