Excel - Countif(Not blank)

Asked By Davi on 17-Apr-08 09:10 PM
Trying to count cells in the indicated cell that are not blank. This is what
I tried, but it still counts blank cells.

=(COUNTIF(AB4,"<>""")+COUNTIF(AG4,"<>""")+COUNTIF(AL4,"<>""")+COUNTIF(AQ4,"<>"""))

Thanks




Fred Smith replied on 17-Apr-08 09:32 PM
Just use "<>" rather than "<>"""

Regards,
Fred.
Teethlessmam replied on 17-Apr-08 10:58 PM
Try this:

=SUMPRODUCT(--(MOD(COLUMN(AB4:AQ4),5)=3),--(AB4:AQ4<>""))
Tyro replied on 18-Apr-08 10:42 AM
To work, your formula would have to be

=COUNTIF(AB4,"<>"&"")+COUNTIF(AG4,"<>"&"")+COUNTIF(AL4,"<>"&"")+COUNTIF(AQ4,"<>"&"")

However, as Fred said, you can use the simpler

=COUNTIF(AB4,"<>")+COUNTIF(AG4,"<>")+COUNTIF(AL4,"<>")+COUNTIF(AQ4,"<>")

Note that there is no need for parentheses around the whole formula

Tyro