Count nonblank cells with multiple criteria

D

Daniel

I have a fairly large spread sheet that I usually filter or us a pivot table
to get what I need and then manually input into another workbook. What I
need is to count the nonblank cells in column G (which consists of times in
hh:mm:ss format) based on column A = KM06 and column C = 1 (both general
format).

I have tried using the sumproduct, sumif, if, and count.

Thank You in advance,
 
B

Bob Phillips

=SUMPRODUCT(--(A2:A20="KM06"),--(C2:C20=1),--(NOT(ISBLANK(G2:G20))))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
D

Daniel

Thank you Bob, that worked great!! I have one more question, that I didn't
think of earlier. What if I wanted the criteria for column C to be 1 or 2
instead of just 1?

Thank You Again,
 
B

Bob Phillips

Yeah, that is possible too

=SUMPRODUCT((A2:A20="KM06")*(C2:C20={1,2})*(NOT(ISBLANK(G2:G20))))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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