# Thread: Countifs with Or tidy-up Thanks: 0 Likes: 0

1. ## Countifs with Or tidy-up

Hi,

Can anyone help condense this please?

Code:
`=COUNTIFS(DatesWork!\$C\$2:\$C\$3000,"GATED",DatesWork!\$G\$2:\$G\$3000,"01/01/1900")+COUNTIFS(DatesWork!\$C\$2:\$C\$3000,"GATED",DatesWork!\$G\$2:\$G\$3000,"#")+COUNTIFS(DatesWork!\$C\$2:\$C\$3000,"GATED",DatesWork!\$G\$2:\$G\$3000,"No Date")`
Thanks

2. ## Re: Countifs with Or tidy-up

Try something like that:

Code:
`=SUMPRODUCT(--(\$C\$2:\$C\$3000="GATED"),(\$G\$2:\$G\$3000=1)+(\$G\$2:\$G\$3000="#")+(\$G\$2:\$G\$3000="No Date"))`
Please note that I replaced "01/01/1900" with "1", as this is the first registered date in the system.

3. ## Re: Countifs with Or tidy-up

Thank you, that did the trick 😀

4. ## Re: Countifs with Or tidy-up

Hi,

Try also this:

=SUM(COUNTIFS(DatesWork!\$C\$2:\$C\$3000,"GATED",DatesWork!\$G\$2:\$G\$3000,{"01/01/1900","#","No Date"}))

5. ## Re: Countifs with Or tidy-up

You're welcome jtakw's solution will also work perfectly fine. Cheers.