HELP!! Needing to subtract just one from this formula

I have this formula for a total count! I just need to subtract 1 from the formula

This is what I have and it is showing Unparseable

="2021-2022 Total Contracts: " + COUNTIFS([Start Date]:[Start Date], AND(@cell >= DATE (2021, 1, 1), @cell <= DATE(2022, 12, 31)))-1)

Best Answer

  • Carson Penticuff
    Carson Penticuff Community Champion
    Answer ✓

    You have a small error with your parentheses, this should fix it:

    ="2021-2022 Total Contracts: " + (COUNTIFS([Start Date]:[Start Date], AND(@cell >= DATE(2021, 1, 1), @cell <= DATE(2022, 12, 31)))-1)

    While this formula works fine and is completely relevant, you can also rewrite it to avoid using the AND statement since COUNTIFS is meant to be used with multiple conditions anyway. This should work as well:

    ="2021-2022 Total Contracts: " + (COUNTIFS([Start Date]:[Start Date], @cell >= DATE(2021, 1, 1), [Start Date]:[Start Date], @cell <= DATE(2022, 12, 31))-1)

    But, like I said, your original approach is fine…. just showing multiple options.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!