Having trouble with COUNTIFS.

Hi All,

I'm trying to write a formula to achieve the following: count a value at row/label, but only if it has a date in the "Date Requested" column that fell within the last 30 days: this is the formula I want to add to. (This first formula works well for the total count.)

=COUNTIF({Alpha-3 Code}, Label12)

I've been working with various versions of the formula below, but I keep getting #UNPARSEABLE. I will need a formula for each (This Week, Last Week, and Last 30 Days). What am I doing wrong?

=COUNTIFS({Alpha-3 Code}, Label12, {Date Requested}, ">=" & (TODAY() - 30))


Best Answer

Answers

  • DKazatsky2
    DKazatsky2 ✭✭✭✭✭
    edited 03/19/24 Answer ✓

    Hi @Seatora,

    Try something like this.

    =COUNTIFS({Alpha-3 Code}, Label12, {Date Requested}, AND(@cell >= TODAY(-30), @cell <= TODAY()))

    Hope this helps,

    Dave

  • Seatora
    Seatora ✭✭✭

    @Dave, Thank you so much!! This worked perfectly, and I was able to modify it for the other versions I needed. Thanks again!!!

  • Seatora
    Seatora ✭✭✭

    Hi! Are you available to help with some other versions of this formula?

    In the Total Count formula, I'm trying to count only the number of times each country code occurs, but the 2nd criteria is that the value "Outside of the US" must also be present in the "Request Type" column.

    TOTAL COUNT

    =COUNTIF({Country or Territory Name}, Label7)

    In the Last 7 Days formula, I'm trying to count only the number of times each country code occurs within the last 7 days, but the 2nd criteria is that the value "Outside of the US" must also be present in the "Request Type" column.

    LAST 7 DAYS

    =COUNTIFS({Country or Territory Name}, Label7, {Date Requested}, AND(@cell >= TODAY(-7), @cell <= TODAY()))



Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!