Count Visible rows, no matter if are blank ot not blank in a table

drom

Well-known Member
Joined
Mar 20, 2005
Messages
543
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Sa I have a Table (eg: A1:B50)
Imaging my Column A:B'cells are most of the time empty

If I filter by Column(A, to show blanks and = to France, I count 15 rows
If I filter by France I only count 10

But any formula to get 15 ??

I do not care about France, I would like to Count How many rows I have filtered, no matter if they are empty, blank or with info

ANy idea

I was trying to use:

=SUMPRODUCT((A2:A50="")*SUBTOTAL(103;OFFSET(A2;ROW(A2:A50)-MIN(ROW(A2:A50));0)))+SUMPRODUCT((A2:A50<>"")*SUBTOTAL(103;OFFSET(A2;ROW(A2:A50)-MIN(ROW(A2:A50));0)))

BUT DOES NOT WORK
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Add column C to your table and inset a value (** see below) in EVERY row 2:50 , and use this formula
=SUBTOTAL(3,C2:C50)

If your table includes a column which contains a value in every row, then simply use that column

** a value
any value - the cell must not be empty
space
apostrophe
number
word
the value can differ between rows
 
Last edited:
Upvote 0
I do not want to use, additional columns.
I would like to know if I have any other option
=ROWS(A2:A50) counts hidden and not hidden rows

=SUMPRODUCT((A2:A50<>"")*SUBTOTAL(103;OFFSET(a2;ROW(A2:A50)-MIN(ROW(A2:A50));0))) counts visible cells with column A non Blank
=SUMPRODUCT((A2:A50="")*SUBTOTAL(103;OFFSET(a2;ROW(A2:A50)-MIN(ROW(A2:A50));0))) does not count blank visible cells,
 
Last edited:
Upvote 0
Sorry but
=SUBTOTAL(3,A2:A50) counts filtered cells in A2:A50 different than BLANK, <> ""

I need to count filtered cells in A2:A50 no matter if the cell is blank or if the cell contains Info
Actually I am not going to filter the Column A, I am going to filter the Column X, and in my table I do not have any column always with data, and I do not want to add any additional column, like =row(), or rand() or..
 
Last edited:
Upvote 0
Sorry but
=SUBTOTAL(3,A2:A50) counts filtered cells in A2:A50 different than BLANK, <> ""

I need to count filtered cells in A2:A50 no matter if the cell is blank or if the cell contains Info
Actually I am not going to filter the Column A, I am going to filter the Column X, and in my table I do not have any column always with data, and I do not want to add any additional column, like =row(), or rand() or..

Try...

=SUMPRODUCT(SUBTOTAL(103,OFFSET($A$2,ROW($A$2:$A$50)-ROW($A$2),0)),($A$2:$A$50="")+($A$2:$A$50<>""))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,179
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top