How to count the number of rows with something in them?

I want to count how many rows have text in them. I've tried Count and CountIf and I can only figure out how to count the ones without something in there using "".

MacBook Air, macOS 13.3

Posted on Apr 22, 2023 5:33 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 22, 2023 6:33 AM

COUNT will count how many have numbers, dates, booleans, and other numeric data. This excludes text. Numbers or other numeric data in cells formatted as text are also excluded (because they are text).


COUNTA will count how many have anything in them, including "white space" characters such as spaces and tabs and formulas that result in ""


COUNTIF(B,REGEX(".")) will count how many in column B have any character(s) in them, including "white space" characters such as spaces and tabs but excluding formulas that result in ""


COUNTIF(B,REGEX("[a-zA-Z]")) will count how many in column B contain at least one letter from the alphabet.


With REGEX you can be fairly specific about what you want to include. COUNTIFS can also narrow things down.

4 replies
Question marked as Top-ranking reply

Apr 22, 2023 6:33 AM in response to excel2numbers

COUNT will count how many have numbers, dates, booleans, and other numeric data. This excludes text. Numbers or other numeric data in cells formatted as text are also excluded (because they are text).


COUNTA will count how many have anything in them, including "white space" characters such as spaces and tabs and formulas that result in ""


COUNTIF(B,REGEX(".")) will count how many in column B have any character(s) in them, including "white space" characters such as spaces and tabs but excluding formulas that result in ""


COUNTIF(B,REGEX("[a-zA-Z]")) will count how many in column B contain at least one letter from the alphabet.


With REGEX you can be fairly specific about what you want to include. COUNTIFS can also narrow things down.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to count the number of rows with something in them?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.