문제

Please see my image,

enter image description here

I am need to count number of rows that have the cell value (in G column) = 1; but the values of column A and column B not equal another rows (not loop). For example: Row 4 have A4 = A3 = 16 and B4= B3 = 221 so we ignore (Row 6 is ignore, too).

Do you know what is the proper function ?

Thank you very much.

도움이 되었습니까?

해결책

As per your image, use this one in I1 and drag it down:

=IF(AND(G1=1,COUNTIFS($A$1:$A1,$A1,$B$1:$B1,$B1)=1),"YES","NO")

and then in I8 you can use

=COUNTIF(I1:I6,"YES")

다른 팁

You can just do something like this, where you can add as many other conditionals as you need to the AND function.

=IF(AND(G4=1, NOT(A4=A3), NOT(B4=B3)),"True","False")

I'm having a little trouble following the logic in your question - the best solution is likely to write a custom VBA function and then call that function per cell. See www.cpearson.com/excel/writingfunctionsinvba.aspx

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