Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default count function further

Thank you for all those that helped me with the count function for running
total. Now I want to take that a little further, using the following
worksheet
A B C D
1 Bat Defective 1
2 Bat Defective 1
3 Ball Defective 2
4 Bat Defective 3
5 Bat Good 4
n Glove Defective 5

I want a running total of bat, ball, glove, using those values as a search
string, that are defective from column B, and the value in C does not match.
So basically I need to first look at colum B grab all that are defective,
then look at column A grab 1st "Bat" using "bat" as the search string, then
get a running total of all bats that are defective, that the value in column
c does not match.
For our example my results should be
bat = 2
ball = 1
glove = 1

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default count function further

Assuming no empty cells in column C.

E1:E3 = Bat, Ball, Glove

Enter this array formula** in F1 and copy down to F3:

=COUNT(1/FREQUENCY(IF((A$1:A$6=E1)*(B$1:B$6="defective"),C$ 1:C$6),C$1:C$6))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)


--
Biff
Microsoft Excel MVP


"AJ Patel" wrote in message
...
Thank you for all those that helped me with the count function for running
total. Now I want to take that a little further, using the following
worksheet
A B C D
1 Bat Defective 1
2 Bat Defective 1
3 Ball Defective 2
4 Bat Defective 3
5 Bat Good 4
n Glove Defective 5

I want a running total of bat, ball, glove, using those values as a search
string, that are defective from column B, and the value in C does not
match.
So basically I need to first look at colum B grab all that are defective,
then look at column A grab 1st "Bat" using "bat" as the search string,
then
get a running total of all bats that are defective, that the value in
column
c does not match.
For our example my results should be
bat = 2
ball = 1
glove = 1



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default count function further

Try this.

For Bat:
=SUMPRODUCT(--(B1:B100="Defective"),--(A1:A100="Bat"),C1:C100)

For Ball:
=SUMPRODUCT(--(B1:B100="Defective"),--(A1:A100="Ball"),C1:C100)

For Glove:
=SUMPRODUCT(--(B1:B100="Defective"),--(A1:A100="Glove"),C1:C100)

HTH,
Paul

--

"AJ Patel" wrote in message
...
Thank you for all those that helped me with the count function for running
total. Now I want to take that a little further, using the following
worksheet
A B C D
1 Bat Defective 1
2 Bat Defective 1
3 Ball Defective 2
4 Bat Defective 3
5 Bat Good 4
n Glove Defective 5

I want a running total of bat, ball, glove, using those values as a search
string, that are defective from column B, and the value in C does not
match.
So basically I need to first look at colum B grab all that are defective,
then look at column A grab 1st "Bat" using "bat" as the search string,
then
get a running total of all bats that are defective, that the value in
column
c does not match.
For our example my results should be
bat = 2
ball = 1
glove = 1



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default count function further

Ok, I mis-read a little.
Try this:

For Bat:
=SUMPRODUCT(--(B1:B100="Defective"),--(A1:A100="Bat"))

For Ball:
=SUMPRODUCT(--(B1:B100="Defective"),--(A1:A100="Ball"))

For Glove:
=SUMPRODUCT(--(B1:B100="Defective"),--(A1:A100="Glove"))

Regards,
Paul

--

"PCLIVE" wrote in message
...
Try this.

For Bat:
=SUMPRODUCT(--(B1:B100="Defective"),--(A1:A100="Bat"),C1:C100)

For Ball:
=SUMPRODUCT(--(B1:B100="Defective"),--(A1:A100="Ball"),C1:C100)

For Glove:
=SUMPRODUCT(--(B1:B100="Defective"),--(A1:A100="Glove"),C1:C100)

HTH,
Paul

--

"AJ Patel" wrote in message
...
Thank you for all those that helped me with the count function for
running
total. Now I want to take that a little further, using the following
worksheet
A B C D
1 Bat Defective 1
2 Bat Defective 1
3 Ball Defective 2
4 Bat Defective 3
5 Bat Good 4
n Glove Defective 5

I want a running total of bat, ball, glove, using those values as a
search
string, that are defective from column B, and the value in C does not
match.
So basically I need to first look at colum B grab all that are defective,
then look at column A grab 1st "Bat" using "bat" as the search string,
then
get a running total of all bats that are defective, that the value in
column
c does not match.
For our example my results should be
bat = 2
ball = 1
glove = 1





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default count function further

Thanks to you both for your help

"AJ Patel" wrote:

Thank you for all those that helped me with the count function for running
total. Now I want to take that a little further, using the following
worksheet
A B C D
1 Bat Defective 1
2 Bat Defective 1
3 Ball Defective 2
4 Bat Defective 3
5 Bat Good 4
n Glove Defective 5

I want a running total of bat, ball, glove, using those values as a search
string, that are defective from column B, and the value in C does not match.
So basically I need to first look at colum B grab all that are defective,
then look at column A grab 1st "Bat" using "bat" as the search string, then
get a running total of all bats that are defective, that the value in column
c does not match.
For our example my results should be
bat = 2
ball = 1
glove = 1



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default count function further

You're welcome.

Hopefully, one of our suggestions worked!


--
Biff
Microsoft Excel MVP


"AJ Patel" wrote in message
...
Thanks to you both for your help

"AJ Patel" wrote:

Thank you for all those that helped me with the count function for
running
total. Now I want to take that a little further, using the following
worksheet
A B C D
1 Bat Defective 1
2 Bat Defective 1
3 Ball Defective 2
4 Bat Defective 3
5 Bat Good 4
n Glove Defective 5

I want a running total of bat, ball, glove, using those values as a
search
string, that are defective from column B, and the value in C does not
match.
So basically I need to first look at colum B grab all that are
defective,
then look at column A grab 1st "Bat" using "bat" as the search string,
then
get a running total of all bats that are defective, that the value in
column
c does not match.
For our example my results should be
bat = 2
ball = 1
glove = 1



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
COUNT Function Richard Excel Worksheet Functions 3 March 12th 07 04:38 PM
Count function L.T. Excel Discussion (Misc queries) 4 January 20th 07 03:40 AM
Count Function MO Excel Worksheet Functions 9 April 7th 06 01:05 PM
Count function Liz23 Excel Worksheet Functions 2 March 15th 06 02:21 PM
count function Brian Excel Worksheet Functions 8 December 21st 04 09:25 PM


All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"