HELP with countif and filters

micky147

New Member
Joined
Aug 18, 2011
Messages
29
Hi, I have a spreadsheet where column B lists the shifts (Days, Earlies or Nights) for 102 employees. Columns G to AK represent each day of the month for August. If someone is on holiday, I enter V in the cell of each day they are off.

I have entered =COUNTIF(G4:G105,"V") to tell me how many are on holiday each day, but when I filter column B to get the totals for each shift, it still counts the hidden cells and returns the same total.

Help please!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi,

Are there only Vs and blank-cells in the columns?

If so you can use
=SUBTOTAL(3,G$4:G$105)
copy across

If there are others values like, say P for present or something like that, use
=SUMPRODUCT(SUBTOTAL(3,OFFSET($B$4:$B$105,ROW($B$4:$B$105)-ROW($B$4),0,1)),--(G$4:G$105="V"))
copy across

Assuming your data in rows 4 till 105

HTH

M.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

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