Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I count the rows with data in an Excel sheet?

I am trying to count the number of rows in a spreadsheet which contain at least one non-blank value over a few columns: i.e.

row 1 has a text value in column A
row 2 has a text value in column B
row 3 has a text value in column C
row 4 has no values in A, B or C

The formula would equate to 3, because rows 1, 2, & 3 have a text value in at least one column. Similarly if row 1 had a text value in each column (A, B, & C) this would be counted as 1.

like image 904
David Avatar asked Jul 28 '11 23:07

David


People also ask

How do I count the number of rows containing text in Excel?

If you want to learn how to count text in Excel, you need to use function COUNTIF with the criteria defined using wildcard *, with the formula: =COUNTIF(range;"*") . Range is defined cell range where you want to count the text in Excel and wildcard * is criteria for all text occurrences in the defined range.


1 Answers

With formulas, what you can do is:

  • in a new column (say col D - cell D2), add =COUNTA(A2:C2)
  • drag this formula till the end of your data (say cell D4 in our example)
  • add a last formula to sum it up (e.g in cell D5): =SUM(D2:D4)
like image 65
JMax Avatar answered Oct 21 '22 15:10

JMax