# countif - "incorrect argument"

Options

Hi,

=COUNTIF(ISDATE([nächste Wartung]1:[nächste Wartung]51); <=TODAY()))

doesn´t work - why?

• ✭✭✭✭✭✭
Options

Try something like this...

=COUNTIFS([nächste Wartung]1:[nächste Wartung]51, AND(ISDATE(@cell), @cell <= TODAY()))

• Options

I got

"Invalid Data Type" ?

• ✭✭✭✭✭✭
Options

Double check that your [nächste Wartung] column is set to a date type column. Also... I missed the fact that your region uses semicolons instead of commas, so you would need to also adjust that from my earlier formula.

• Options

Yes,

[nächste Wartung] is set to date type and

we have semicolons.

Hope you find the point ;-)

• ✭✭✭✭✭✭
Options

How is the date generated in that column?

• Options

=DATE(YEAR([letzte Wartung]@row) + ROUNDDOWN((MONTH([letzte Wartung]@row) + Wartungsintervall@row) / 12; 0) + IF(IF(MOD(MONTH([letzte Wartung]@row) + Wartungsintervall@row; 12) = 0; 12; MOD(MONTH([letzte Wartung]@row) + Wartungsintervall@row; 12)) = 12; -1); IF(MOD(MONTH([letzte Wartung]@row) + Wartungsintervall@row; 12) = 0; 12; MOD(MONTH([letzte Wartung]@row) + Wartungsintervall@row; 12)); DAY([letzte Wartung]@row))

• ✭✭✭✭✭✭
Options

That's what I was afraid of. So the data is an actual date as well. Do you have any blanks or non-date data within the range?

=COUNTIFS([nächste Wartung]1:[nächste Wartung]51, AND(ISDATE(@cell), IFERROR(@cell, TODAY(2)) <= TODAY()))

Lets try that...

• Options

I am sorry. it still shows = #Invalid Data Type

• ✭✭✭✭✭✭
Options

Ok. Let's try logging out, clearing your cache and cookies, then logging back in again. This formula SHOULD be working, so we are getting close to needing to reach out to Support. It may even be something as simple as the sheet just needs refreshed on the back-end.

• Options

still #Invalid.

Last question. Does it matter that the formula is in the sheet summary and not in a cell inside the sheet ?

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!