Count if on two columns

Options

I have a sheet that pulls from another, I need to do a count if for two different columns. I use this formula for one, how do I add another?

=COUNTIF({Date 2}, [Start Date]@row)

I need something like: =COUNTIF({Date 2}, [Start Date]@row), =COUNTIF({Review Board}, [ReviewBoard]@row=XX)

It is an agenda sheet that has a set number of minutes, then I subtract minutes based on the number of topics added for that date. Now I need to also do a type of lookup for the Review Board. There are three Review Boards and in many cases the dates are now the same.

Tags:

Best Answer

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    edited 01/08/22 Answer ✓
    Options

    Hey Leann

    The syntax is correct. When you entered it into your destination sheet - did you get what you expected?

    oops you forgot an @row

     =COUNTIFS({Date 2}, [Start Date]@row, {Review Board}, [Oncology TAG]@row)

Answers

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Options

    Hey @Leann Gibson

    The COUNTIF (singular) function works when a single criteria is involved.

    The COUNTIFS (plural) function works for any number of criteria - from one to whatever. My personal preference is to only use the plural version because of its versatility.

    The syntax is

    =COUNTIFS(range1, criteria1, range2, criteria2, etc)

    Does this get you what you need?

    Kelly

  • Leann Gibson
    Leann Gibson ✭✭✭✭✭
    Options

    I current formula is: =COUNTIF({Date 2}, [Start Date]@row)

    I want to add if the {Review Board} is + to Oncology TAG

    Would it be: =COUNTIFS({Date 2}, [Start Date], {Review Board}, [Oncology TAG]@row)

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    edited 01/08/22 Answer ✓
    Options

    Hey Leann

    The syntax is correct. When you entered it into your destination sheet - did you get what you expected?

    oops you forgot an @row

     =COUNTIFS({Date 2}, [Start Date]@row, {Review Board}, [Oncology TAG]@row)

  • Leann Gibson
    Leann Gibson ✭✭✭✭✭
    Options

    Cannot get it to work, must be something on my side. Thanks for the ideas.

  • Leann Gibson
    Leann Gibson ✭✭✭✭✭
    Options

    Figured it out, the second criteria needed to be the name of the column.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!