Excel – Count Cells with Data — COUNTA

The COUNTA function will count cells that are not empty. Its syntax is:

=COUNTA(value1, value2,...value30)

The arguments (e.g. value1) can be [gs cell reference]s, or values typed into the formula. The following example uses one argument -- a reference to cells A1:A5.

  1. Enter the sample data on your [gs worksheet];
  2. In cell A7, enter a COUNTA formula, to count the numbers in column A:   =COUNTA(A1:A5) ;
  3. Press the Enter key, to complete the formula;
  4. The result will be 4, the number of cells that contain data;

Note: COUNTA will count cells with formulas — including those that look empty, because they evaluate to "", e.g. =IF(B2="","",B2). It will also count cells which had formulas that evaluated to "", but then were converted to values (Edit | Paste Special, Values).

You can see apostrophes in those "non-blank" converted cells, if you add a check mark to Tools | Options, Transition tab, "Transition navigation keys".


LINK (Contextures.com)