COUNTIF with date range and another critieria

Options
✭✭✭✭✭✭

Hi,

I'm trying to count the number of rows which have a 60-day opt-out window between x and y and where the "Monthly DataCor Revenue" is blank.

This formula works (y'all helped me with this):

=COUNTIFS({Lite 60 day opt out}, AND(@cell >= DATE(2022, 8, 1), @cell <= DATE(2022, 8, 31)))

but I cannot get an answer when I add in the "Monthly DataCor Revenue" is blank criteria. This is what I've been working with but I get Invalid Data Type:

=COUNTIFS(AND({Monthly DataCor Revenue}, "", ""), {Lite 60 day opt out}, AND(@cell >= DATE(2022, 4, 1), @cell <= DATE(2022, 4, 30)))

I also tried this, same error:

=COUNTIFS({Lite 60 day opt out}, AND({Monthly DataCor Revenue}, "", "", @cell >= DATE(2022, 4, 1), @cell <= DATE(2022, 4, 30)))

Any ideas? Thanks!!

Tags:

• ✭✭✭✭✭✭
Options

You don't need the additional AND (or its corresponding parenthesis).

=COUNTIFS({Monthly DataCor Revenue}, @cell = "", {Lite 60 day opt out}, AND(@cell >= DATE(2022, 4, 1), @cell <= DATE(2022, 4, 30)))

• ✭✭✭✭✭✭
Options

You don't need the additional AND (or its corresponding parenthesis).

=COUNTIFS({Monthly DataCor Revenue}, @cell = "", {Lite 60 day opt out}, AND(@cell >= DATE(2022, 4, 1), @cell <= DATE(2022, 4, 30)))

• ✭✭✭✭✭✭
Options

Thanks Paul!

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!