CountIf on visible rows only

DarkJester89

Board Regular
Joined
Nov 5, 2017
Messages
109
Office Version
  1. 2016
Platform
  1. Windows
I have a formula

=COUNTIF(Table1[Column11],10)+COUNTIF(Table1[Column11],11)

Combined countif to look for 10 or 11 in the table

It's on a filtered table, but is there a way to convert this to count only visible rows? I've tried various subtotal formulas but can't get it to work. Thank you in advance.
1681042677763.png
 
Ok how about
Excel Formula:
=COUNTIFS(Table1[Column11],">9",Table1[IsVisible],1)

I inputted this and it's still only recognizing the first table entry and errors out.
1681134904186.png


I uploaded it a drive, cell AL16, "formula parse error"

Workbook

Thanks again for your time.
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
You don't have a column called IsVisible, it's called Column12, so you need to change the formula accordingly.
 
Upvote 0
You don't have a column called IsVisible, it's called Column12, so you need to change the formula accordingly.
The formula works changing it to column 12. My original intent ? was if it was possible to convert it to only count rows in the table that are visible, so for example if I hide a row, it'll reduce it by one.
 
Upvote 0
That's exactly what it does.
 
Upvote 0
That's exactly what it does.
I had to reupload my workbook, it looks like someone went in haywired the formulas I put in.

With the formulas above, I hid row 2-10, and it's still counting four and should only count 1 (the visible row with >9, 10 or 11).
1681296098095.png


Workbook

Thanks for your patience, got swamped at work.
 
Upvote 0
As you are manually hiding rows rather than using the filter, you need to use
Excel Formula:
=SUBTOTAL(103,[@Column11])
and
Excel Formula:
=COUNTIFS(Table_1[Column11],">9",Table_1[IsVisible],1)
 
Upvote 0
Solution
As you are manually hiding rows rather than using the filter, you need to use
Excel Formula:
=SUBTOTAL(103,[@Column11])
and
Excel Formula:
=COUNTIFS(Table_1[Column11],">9",Table_1[IsVisible],1)

Thank you!! I added brackets around the quoted >9 but it works! Goodness gracious, thank you!

Excel Formula:
=COUNTIFS(Table1[Column11],{">9"},Table1[IsVisible],1)
 
Upvote 0
You do not need the {} in there.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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