INVALID DATA TYPE error

Options

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 Community Champion
    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".

    Darren Mullen, Author of: Smartsheet Architecture Solutions

    Get my 7 Smartsheet tips here

    Take your Smartsheet knowledge to the next level and become an expert. Join the Smartsheet Guru Elite

Answers

  • Darren Mullen
    Darren Mullen Community Champion
    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".

    Darren Mullen, Author of: Smartsheet Architecture Solutions

    Get my 7 Smartsheet tips here

    Take your Smartsheet knowledge to the next level and become an expert. Join the Smartsheet Guru Elite

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!