INVALID DATA TYPE error

Hi,

I'm trying to count the cells that match these criteria but am getting an invalid data type error.

=COUNTIFS(OR({Tier}, "Experiencia", {Tier}, "Experiencia Plus", {Tier}, "Experiencia Plus Unlimited"), {Renewal Month}, 1, {Renewal Year}, 2023)


The formula worked successfully without the OR statement:

=COUNTIFS({Tier}, "Experiencia Lite", {Renewal Month}, 1, {Renewal Year}, 2023)


Thank you!

Tags:

Best Answer

  • Darren Mullen
    Darren Mullen ✭✭✭✭✭✭
    Answer ✓

    @deb_63_hydracor Yes, that makes sense that it worked without the OR. In the formula with the "OR" you placed it in the range parameter and that is not a valid range.

    Try this:

    =COUNTIFS({Tier}, OR(@cell = "Experiencia Lite". @cell = "Experiencia", @cell = "Experiencia Plus Unlimited"), {Renewal Month}, 1, {Renewal Year}, 2023)

    By the way, I'm not 100% sure the OR function will work like that, but try it. If not, the alternative is to simply have 3 COUNTIFS that add together. Each COUNTIFS will look for a different "Experiencia".

Answers

  • Darren Mullen
    Darren Mullen ✭✭✭✭✭✭
    Answer ✓

    @deb_63_hydracor Yes, that makes sense that it worked without the OR. In the formula with the "OR" you placed it in the range parameter and that is not a valid range.

    Try this:

    =COUNTIFS({Tier}, OR(@cell = "Experiencia Lite". @cell = "Experiencia", @cell = "Experiencia Plus Unlimited"), {Renewal Month}, 1, {Renewal Year}, 2023)

    By the way, I'm not 100% sure the OR function will work like that, but try it. If not, the alternative is to simply have 3 COUNTIFS that add together. Each COUNTIFS will look for a different "Experiencia".

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!