Help required with COUNTIF/AND function

D

DAT

Hi
I am desperately trying to count a column of items using 2 pieces of
criteria instead of the one used in 'countif' and have tried using 'countif'
and 'And' function nested. i have a column of number which are item numbers
(column A). Column 'B' uses 2 criteria 'Good', 'Bad'. In column 'C' I am
trying to count all item numbers in the column of the same type which are
'Good'. i.e countif(if A1='item type',"Good"). However, counif only allows
one piec of criteria. Can anyone help please?

Thanks in advance
DAT
 
B

Bob Phillips

=SUMPRODUCT(--(A2:A20="item type"),--(B2:B20="Good"))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
M

Marcelo

hi Dat,

use sumproduct

=sumproduct(--(a1:a1000="good")*(b1:b1000=2))

hth
regards from Brazil
Marcelo

"DAT" escreveu:
 
D

DAT

Many thanks that worked a treat!
Marcelo said:
hi Dat,

use sumproduct

=sumproduct(--(a1:a1000="good")*(b1:b1000=2))

hth
regards from Brazil
Marcelo

"DAT" escreveu:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top