ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Counting the number of times more than 1 variable occurs (https://www.excelbanter.com/excel-discussion-misc-queries/62827-counting-number-times-more-than-1-variable-occurs.html)

chrisdedobb

Counting the number of times more than 1 variable occurs
 

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?


--
chrisdedobb
------------------------------------------------------------------------
chrisdedobb's Profile: http://www.excelforum.com/member.php...o&userid=30081
View this thread: http://www.excelforum.com/showthread...hreadid=497615


Vito

Counting the number of times more than 1 variable occurs
 

Try

=sumproduct(--(a1:a8="Mike"),--(b1:b8="Separation"))


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=497615


Dave Peterson

Counting the number of times more than 1 variable occurs
 
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 wrote:

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?

--
chrisdedobb
------------------------------------------------------------------------
chrisdedobb's Profile: http://www.excelforum.com/member.php...o&userid=30081
View this thread: http://www.excelforum.com/showthread...hreadid=497615


--

Dave Peterson

Bob Phillips

Counting the number of times more than 1 variable occurs
 
=SUMPRODUCT(--(A1:A8="MIKE"),--(B1:B8="SEPARATION"))


--

HTH

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


"chrisdedobb"
wrote in message
...

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?


--
chrisdedobb
------------------------------------------------------------------------
chrisdedobb's Profile:

http://www.excelforum.com/member.php...o&userid=30081
View this thread: http://www.excelforum.com/showthread...hreadid=497615




chrisdedobb

Counting the number of times more than 1 variable occurs
 

Thanks! That works great!


--
chrisdedobb
------------------------------------------------------------------------
chrisdedobb's Profile: http://www.excelforum.com/member.php...o&userid=30081
View this thread: http://www.excelforum.com/showthread...hreadid=497615


BenjieLop

Counting the number of times more than 1 variable occurs
 

chrisdedobb Wrote:
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.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=497615



All times are GMT +1. The time now is 01:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com