Forum Discussion
LesKing
Jun 11, 2023Brass Contributor
Formula to count cells with a date that is less than today
Hi, I need a formula to check column Z (which has a date in each cell) to count how many cells in column Z have a date less than today AND where cells in column L show "Mandatory". I have tried...
- Jun 11, 2023
LesKing How about using the FILTER function (with two criteria) to get an array of data, wrapped in a COUNT function?
=COUNT( FILTER(Database!Z6:Z200, (Database!Z6:Z200<TODAY()) * (Database!L6:L200="Mandatory"), "") )
Edit: Oh, sorry, you wrote less than (before) today and I initially coded for after today.
SnowMan55
Jun 11, 2023Bronze Contributor
LesKing How about using the FILTER function (with two criteria) to get an array of data, wrapped in a COUNT function?
=COUNT( FILTER(Database!Z6:Z200, (Database!Z6:Z200<TODAY()) * (Database!L6:L200="Mandatory"), "") )
Edit: Oh, sorry, you wrote less than (before) today and I initially coded for after today.
- LesKingJun 11, 2023Brass ContributorHi SnowMan55 - that worked perfectly - I am very grateful for your help!
Les King