How to use COUNTIF and COUNTA together in Excel?

david_10001 picture david_10001 · Mar 8, 2018 · Viewed 12.4k times · Source

I have a single column and I want to count how many rows do NOT contain "www." but at the same time are not blank. I have tried:

=COUNTIFS(E2:E79,"<>*www.*",E2:E79,"?*")

This seems to work, but only for text. It will not count columns if it has numbers. I have also tried:

=AND(COUNTIF(E2:E79,"<>*www.*"),COUNTA(E2:E79))

This just returns TRUE. Can someone please show me the correct formula I need to use?

Answer

user4039065 picture user4039065 · Mar 8, 2018

Try,

=COUNTIFS(E2:E79,"<>*www.*",E2:E79,"<>")