excel - using countsif to count items from rows if certain conditions in other columns match -
i'm trying count instances value present in column d if values present in either e,f, or g. specifically, if agent's extension present in column , there number 2 in of 3 columns in row after it, should count it. started this:
=countifs(d2:d392,"9123",e2:e392,"2",f2:f392,"2",g2:g392,"2") but counts if 2 value 3 of columns in row. if value of 1 of columns differs, still want include in count if 2 present in of others.
i tried this:
=countifs(d2:d392,"9124",e2:g391,"2") with hope compare entirety of columns/rows e g, , if have 2 , matches extension in question count it. instead returns #value! error.
any suggestions might doing wrong?
try using sumproduct, e.g.
=sumproduct((d2:d392=9123)*((e2:e392=2)+(f2:f392=2)+(g2:g392=2)>0))
i didn't use quotes around 9123 or 2. sumproduct more fussy countifs - need quotes if values stored text, otherwise should work written
Comments
Post a Comment