Counting the number of times more than 1 variable occurs

  • Thread starter Thread starter chrisdedobb
  • Start date Start date
C

chrisdedobb

I need to determine how many Separations were processed by a particular
salesperson.

A | B
1 MIKE | SEPARATION
2 MIKE | LEAVE
3 SARA | SEPARATION
4 JOE | SEPARATION
5 JAMIE | LEAVE
6 MIKE | LEAVE
7 JOE | LEAVE
8 SARA | SEPARATION

The only way I can think of is the COUNTIF Funtion
*COUNTIF(-range,criteria-)*
=COUNTIF(A1:A8,(A1:A8="MIKE")*(B1:B8="SEPARATION"))
This does not work though. The results return 0 with no errors when
the answer should be 1.

does anyone else know of a way to get what I need? Or is there a
problem with my formula?
 
You may want to look at pivottables. You won't have to build separate formulas
for each name.

but:

=sumproduct(--(a1:a10="mike"),--(b1:b10="Separation"))

Adjust your ranges, but don't use the whole column.

=sumproduct() likes to work with numbers.

The -- converts trues and falses to 1's and 0's.
 
chrisdedobb said:
I need to determine how many Separations were processed by a particular
salesperson.

A | B
1 MIKE | SEPARATION
2 MIKE | LEAVE
3 SARA | SEPARATION
4 JOE | SEPARATION
5 JAMIE | LEAVE
6 MIKE | LEAVE
7 JOE | LEAVE
8 SARA | SEPARATION

The only way I can think of is the COUNTIF Funtion
*COUNTIF(-range,criteria-)*
=COUNTIF(A1:A8,(A1:A8="MIKE")*(B1:B8="SEPARATION"))
This does not work though. The results return 0 with no errors when
the answer should be 1.

does anyone else know of a way to get what I need? Or is there a
problem with my formula?

=SUMPRODUCT((A1:A8=\"MIKE\")*(B1:B8=\"SEPARATION\"))

is the formula to use.

Regards.
 

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

Back
Top