Countifs help! Count visible cells which have been date greater than or less than todays date

amysh

New Member
Joined
Jun 28, 2022
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hi! I'm very new to formulas on excel and learning as I go and by googling a lot!

I have a spreadsheet full of staff names and training completion dates. I have hidden staff who are on long term sick or maternity leave and want to create a formula to count how many staff are currently in date and how many are out of date so that I can then ultimately work out the percentage of the full team who are in date. Can anyone help me with this?

I used =SUBTOTAL to calculate how many staff are visible after hiding those on LTS and maternity but I don't know how to proceed after this
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi & welcome to MrExcel.

Can you post some sample data (using fake names)
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Example data selection.xlsx
ABC
1First namesurnameFirst Aid Expiry
2MorganFinchJul-22
3AylaSkywalkerAug-22
4CandiceGumpMar-22
5AlbertScroogeJun-22
7CoralineWeasleyApr-22
8AngelicaFletcherDec-21
9EllexisChaseOct-22
10MollyHuxleyNov-21
12Total Staff10
13Total Visible Staff8
14Total with dates more than today5
Sheet1
Cell Formulas
RangeFormula
B12B12=COUNTIF(B2:B11, "*")
B13B13=SUBTOTAL(103,B2:B11)
B14B14=COUNTIFS(C2:C11,">"&TODAY())
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C10Cell Value>"today"textNO
C2:C11Cell Value>=NOW()textNO
C2:C11Cell Value<=NOW()textNO
 
Upvote 0
Thanks for that.
How about
Fluff.xlsm
ABCD
1First namesurnameFirst Aid Expiry
2MorganFinch01/07/20221
3AylaSkywalker01/08/20221
4CandiceGump01/03/20221
5AlbertScrooge01/06/20221
6BobLucas01/07/20221
7CoralineWeasley01/04/20221
8AngelicaFletcher01/12/20211
9EllexisChase01/10/20221
10MollyHuxley01/11/20211
11JoeBiden08/10/20221
12Total Staff10
13Total Visible Staff10
14Total with dates more than today5
Sheet1
Cell Formulas
RangeFormula
D2:D11D2=SUBTOTAL(103,A2)
B12B12=COUNTIF(B2:B11, "*")
B13B13=SUBTOTAL(103,B2:B11)
B14B14=COUNTIFS(C2:C11,">"&TODAY(),D2:D11,1)


Fluff.xlsm
ABCD
1First namesurnameFirst Aid Expiry
2MorganFinch01/07/20221
3AylaSkywalker01/08/20221
4CandiceGump01/03/20221
5AlbertScrooge01/06/20221
7CoralineWeasley01/04/20221
8AngelicaFletcher01/12/20211
9EllexisChase01/10/20221
10MollyHuxley01/11/20211
12Total Staff10
13Total Visible Staff8
14Total with dates more than today3
Sheet1
Cell Formulas
RangeFormula
D2:D5,D7:D10D2=SUBTOTAL(103,A2)
B12B12=COUNTIF(B2:B11, "*")
B13B13=SUBTOTAL(103,B2:B11)
B14B14=COUNTIFS(C2:C11,">"&TODAY(),D2:D11,1)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,858
Members
449,051
Latest member
excelquestion515

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