COUNTIFS Formula with CONTAINS in a specific date range only.

Hi everyone. I have a sheet with multiple columns. One column indicates the status of a survey and another column indicates the date the survey was distributed. I want to have a formula that will count the number of rows that contains "Survey Closed" in the status column but only for rows that have a specific date (1/1/24 - 12/31/24) in the Distribution Date column.

I've had success with the below formulas to return one count for the number of surveys closed and one count of how many surveys were distributed in Calendar Year 2024:

=COUNTIF({Survey Tracker Range 2}, CONTAINS("Survey Closed", @cell))

=COUNTIFS({Survey Tracker Range 1}, AND(@cell >= DATE(2024, 1, 1), @cell <= DATE(2024, 12, 31)))

When I try to combine the two ideas above, and return only the number of surveys with a "Survey Closed" status in CY24, I can't get it to work. I've tried the below but I get an "INCORRECT ARGUMENT" error.

=COUNTIFS({Survey Tracker Range 2}, CONTAINS(@cell = "Survey Closed"), {Survey Tracker Range 1}, AND(@cell >= DATE(2024, 1, 1), @cell <= DATE(2024, 12, 31)))

Any help is appreciated. Thanks!

Tags:

Best Answers

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!