Reputation: 1031
Project Completion Target Date | Estimated Completion Date |
---|---|
12/31/2020 | 12/24/2020 |
12/31/2020 | 1/7/2021 |
1/19/2021 | |
2/15/2021 |
I'm trying to create a CountIfs statement, or a CountIf inside an Array, which will evaluate one column in relation to another column, repeated for multiple rows. With multiple conditions: If B > A, and ignore the row is A is empty.
Formula So Far:
=COUNTIF({B2:B5}, ">"&{A2:A5})
Result is 3, but the desired result is 1. This formula is counting when B > null = True. But desired result is when A is empty/null, then B !> A.
Upvotes: 1
Views: 1367
Reputation: 10573
You can also use the following filter formula
=COUNTA(FILTER(B2:B7,A2:A7<>"",B2:B7>A2:A7))
Upvotes: 1
Reputation: 5963
Here's one option.
=COUNT(FILTER(A2:B5,NOT(ISBLANK(A2:A5)),B2:B5>A2:A5))/2
You can use FILTER() to filter your data with multiple conditions then count the filtered data (divide by 2 based on the number of columns in your data)
Your conditions:
Example:
Filter the set of data based on the conditions required.
=FILTER(A2:B5,NOT(ISBLANK(A2:A5)),B2:B5>A2:A5)
Output:
Upvotes: 1