Excluding hidden cell values from a COUNTIF formula

nate209

New Member
Joined
Dec 6, 2017
Messages
1
This formula =COUNTIF(C15:C379,"l") returns a result for how many times an employee has been late YTD. Each row is one day of the year and if I filter by date, lets say for the first quarter, the formula will still return a result for the entire range. What would I need to do so that the returned value will represent the sum of only visible cells in the source column after filtering? any help would be appreciated.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi

Perhaps use a helper column (which can be hidden) but lets say column D for the example

In that helper column you could put =--(C15="i") then then copy it down to D379.

Rather than countif use SUBTOTAL to sum up the helper column =SUBTOTAL(109, D15:D379)

It will exclude hidden rows from the count.

HTH
 
Upvote 0

Forum statistics

Threads
1,223,980
Messages
6,175,763
Members
452,668
Latest member
mrider123

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