Reputation: 3
We're trying to create a sort of filtering system that allows us to filter spreadsheet entries that include a start and end date. We'd like to filter these entries by date (start and end) so we can pull dynamic averages.
We're almost there, though it seems the logic for 'greater/lesser than this date' is not working properly, the result is always 0 after applying the greater/lesser than logic. We tried using just greater-than/lesser-than themselves during troubleshooting and both result in 0. Below is the formula we are currently using. It works as intended until we try to filter between dates:
=COUNTIFS($A$22:$A, B1, $B$22:$B, "Live", $E$22:$E, ">=" &$G$2, $E$22:$E, "<=" &$H$2)
$A$22:$A
: Range of entries
B1
: Entry name we're comparing against
$B$22:$B
: Range of entry statuses
"Live"
: status we're comparing against
$E$22:$E
: Range of dates
&$G$2
: The 'From' date
&$H$2
: The 'To' date
The formula works great until we start trying to filter by date. Any assistance would be greatly appreciated. Thank you!
Upvotes: 0
Views: 657
Reputation: 1
try:
=ARRAYFORMULA(COUNTIFS(A22:A, B1, B22:B, "Live", E22:E*1, ">=" &G2, E22:E*1, "<=" &H2))
Upvotes: 1