문제

I used the COUNTIFS formula and received the same result despite using different criteria. Below is a simplified scenario and here's a screenshot (sorry, newbies cannot post image).

Col A | Col B | Col C | Col D | Col E | Col F |

8/31/12 | Yes | Step 1 | 0 | 8/31/12 | blank | 8/31/12

8/31/12 | blank | blank | 10,000 |

8/31/12 | No | Step 5 | 0 |

The intended logic is as follows:

  • Criteria 1: include if column A matches "8/31/12" or cell F2
  • Criteria 2: include if column B is "Yes" or blank
  • Criteria 3: include if column C matches "Step 1"
  • Criteria 4: include if column D equals "0"

Here's are the two formulas that both resulted in the same answer (count = 1):

  • =COUNTIFS(A2:A4,F2,B2:B4,"Yes",C2:C4,"Step 1",D2:D4,0
  • =COUNTIFS(A2:A4,F2,B2:B4,"<>",C2:C4,"Step 1",D2:D4,0

Also, any suggestions on tweaking the formula to SUM column D if criteria 1-3 are met? Should I use SUMIFS? I think so but the argument structure is different.

Thanks!

도움이 되었습니까?

해결책

=COUNTIFS(A2:A4,F2,B2:B4,"<>",C2:C4,"Step 1",D2:D4,0

should be

=COUNTIFS(A2:A4,F2,B2:B4,"",C2:C4,"Step 1",D2:D4,0

as "" will count blanks, not "<>" for CountIfs / SumIfs

SUMIFS would be

=SUMIFS(D2:D4,A2:A4,F2,B2:B4,"",C2:C4,"Step 1")

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top