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")
Domanda
Please see my image,
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.
Soluzione
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")
Altri suggerimenti
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