COUNTIF with AND function

Hi there,

I'm trying to count the instances that a contract has been executed and occurred in the year 2020. The formula I have unfortunately returns as "incorrect argument set". Any help would be greatly appreciated.


=COUNTIF([Status of Contract]:[Status of Contract], "Executed", AND([Date Received]:[Date Received], IFERROR(YEAR(@cell), 0) = 2020))

Best Answer

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    edited 02/04/21 Answer ✓

    Hey @Mahshad Farmanbar

    When dealing with multiple criteria, you need to use COUNTIFS (plural) instead of COUNTIF (singular). As a point of note, COUNTIFS (plural) can always be used, regardless if one criteria or many. Note that the criteria within the COUNTIFS are already 'AND' criteria

    =COUNTIFS([Status of Contract]:[Status of Contract], "Executed", [Date Received]:[Date Received], IFERROR(YEAR(@cell), 0) = 2020)

    cheers,

    Kelly

Answers

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    edited 02/04/21 Answer ✓

    Hey @Mahshad Farmanbar

    When dealing with multiple criteria, you need to use COUNTIFS (plural) instead of COUNTIF (singular). As a point of note, COUNTIFS (plural) can always be used, regardless if one criteria or many. Note that the criteria within the COUNTIFS are already 'AND' criteria

    =COUNTIFS([Status of Contract]:[Status of Contract], "Executed", [Date Received]:[Date Received], IFERROR(YEAR(@cell), 0) = 2020)

    cheers,

    Kelly

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!