how i use countif and AND?

G

Guest

How I use the countif and AND for the below table. I am looking to count a
number that involved in Unit/Session/Total which has over 500 names. For
example, In SB, how many people ordered water in session one. It is applied
to other like in HSB, how many people ordered water in session two. (If the
total water ordered is blank means didn’t order.)

Key
Column A is Last name
Column B is First name
Column C is Unit
Column D is Session
Column E is Total ordered

Last Name First Name Unit Session TOTAL WATER ORDERED
LastName1 FirstName1 RVG 1
LastName2 FirstName2 SB 1
LastName3 FirstName3 SG B
LastName4 FirstName4 RVG 2
LastName5 FirstName5 SB 1 50
LastName6 FirstName6 SB 1
LastName7 FirstName7 RPG 2
LastName8 FirstName8 HSB 1 75
LastName9 FirstName9 RVG 2 50
LastName10 FirstName10 HSG 2 50
LastName11 FirstName11 RVB 2 50
LastName12 FirstName12 RVB 2
LastName13 FirstName13 HSB 2
LastName14 FirstName14 RVB 1 50
LastName15 FirstName15 RPG 2
LastName16 FirstName16 HSG 1 50
LastName17 FirstName17 HSB 2 100
LastName18 FirstName18 HSB 2
LastName19 FirstName19 SB STAFF 50
LastName20 FirstName20 SRC STAFF 59
LastName21 FirstName21 LS STAFF 58
LastName22 FirstName22 HSB STAFF 50
LastName23 FirstName23 RVG STAFF 75
LastName24 FirstName24 SB STAFF 75
LastName25 FirstName25 TENNIS STAFF 100

Thank you.
Jeff
 
G

Guest

This is not what I wanted.. What you did, you count how many people in unit
SB in session 1.. I have to add in there to see how many people ordered
water.. If nobody ordered water then dont count.... as you see the column E
that some people ordered 50 or 75 or 100. I need to know how many people
ordered water in unit and session.


Thank you.
 
G

Guest

It won't work... I dont know if you understand what I wanted... Can you
explain to me what you did with this equation?

Jeff
 
G

Guest

It is working this time. I figure it out why it didnt work before because
some of the column were copy from another sheet.. Can you explain to me why
you use this function because I dont understand this function. Like why you
use SUMPRODUCT and use "*"

Thank you.
Jeff
 
A

Ardus Petus

The boolean conditions (TRUE/FALSE) are converted to 0/1 , then multiplied.
If all conditions are TRUE (1), the result is 1
Then SUMPRODUCT adds these results for all rows in the range., giving a
count.

HTH
 
G

Guest

I forgot to add in the pervious message.. The function that you gave to me is
working, but the column E were not the total number that entered number, but
it uses the function of =sum(a2:f2) from another sheet. When I put the
function and it came out in total number of whole SB even people who didnt
ordered. What is the correct function?

Thanks,
Jeff
 
G

Guest

Sorry.. One more thing.. How I copy the number in another sheet where keep
stored the total number of bottles give out daily in units/session.. I dont
means the totel of WHOLE number in one month.

Thanks,
Jeff
 
G

Guest

never mind..... My brain is sleeping!!!

Thanks.

Jeff said:
Sorry.. One more thing.. How I copy the number in another sheet where keep
stored the total number of bottles give out daily in units/session.. I dont
means the totel of WHOLE number in one month.

Thanks,
Jeff
 
G

Guest

One more thing, Sorry.... what is the function that use SB and 1 and B.. I
tried =SUMPRODUCT((C1:C1000="SB")*(D1:D1000=1)*(D1:D1000="B") and it wont
work.

Thanks.
 

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