#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default countif

Cells A1: A10 and B1:B10 have a list of components "NUTS" and "BOLTS" I
would like to use countif to total the number of times I see NUTS but only if
bolts can be seen in the same row
A B
1 NUTS BOLTS 1
2 SCREWS BOLTS
3 NUTS WASHERS
4 NUTS WASHERS
5 SCREWS BOLTS
6 SCREWS WASHERS
7 SCREWS WASHERS
8 NUTS WASHERS
9 SCREWS WASHERS
10 NUTS BOLTS 1
Total 2

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default countif

=SUMPRODUCT(--(A2:A11="NUTS"),--(B2:B11="BOLTS"))
Regards,
Stefi

€žAndy K€ť ezt Ă*rta:

Cells A1: A10 and B1:B10 have a list of components "NUTS" and "BOLTS" I
would like to use countif to total the number of times I see NUTS but only if
bolts can be seen in the same row
A B
1 NUTS BOLTS 1
2 SCREWS BOLTS
3 NUTS WASHERS
4 NUTS WASHERS
5 SCREWS BOLTS
6 SCREWS WASHERS
7 SCREWS WASHERS
8 NUTS WASHERS
9 SCREWS WASHERS
10 NUTS BOLTS 1
Total 2

Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default countif

=SUMPRODUCT(($A$1:$A$100="Nuts")*($B$1:$B$100="Bol ts"))

If this post helps click Yes
---------------
Jacob Skaria


"Andy K" wrote:

Cells A1: A10 and B1:B10 have a list of components "NUTS" and "BOLTS" I
would like to use countif to total the number of times I see NUTS but only if
bolts can be seen in the same row
A B
1 NUTS BOLTS 1
2 SCREWS BOLTS
3 NUTS WASHERS
4 NUTS WASHERS
5 SCREWS BOLTS
6 SCREWS WASHERS
7 SCREWS WASHERS
8 NUTS WASHERS
9 SCREWS WASHERS
10 NUTS BOLTS 1
Total 2

Thanks in advance

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default countif

Not COUNTIF, but:
=SUMPRODUCT((A1:A10="NUTS")*(B1:B10="BOLTS"))
--
David Biddulph


"Andy K" wrote in message
...
Cells A1: A10 and B1:B10 have a list of components "NUTS" and "BOLTS" I
would like to use countif to total the number of times I see NUTS but only
if
bolts can be seen in the same row
A B
1 NUTS BOLTS 1
2 SCREWS BOLTS
3 NUTS WASHERS
4 NUTS WASHERS
5 SCREWS BOLTS
6 SCREWS WASHERS
7 SCREWS WASHERS
8 NUTS WASHERS
9 SCREWS WASHERS
10 NUTS BOLTS 1
Total 2

Thanks in advance



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default countif

Thanks this is Just what I'm looking for

"Stefi" wrote:

=SUMPRODUCT(--(A2:A11="NUTS"),--(B2:B11="BOLTS"))
Regards,
Stefi

€žAndy K€ť ezt Ă*rta:

Cells A1: A10 and B1:B10 have a list of components "NUTS" and "BOLTS" I
would like to use countif to total the number of times I see NUTS but only if
bolts can be seen in the same row
A B
1 NUTS BOLTS 1
2 SCREWS BOLTS
3 NUTS WASHERS
4 NUTS WASHERS
5 SCREWS BOLTS
6 SCREWS WASHERS
7 SCREWS WASHERS
8 NUTS WASHERS
9 SCREWS WASHERS
10 NUTS BOLTS 1
Total 2

Thanks in advance



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default countif

Result showing 0 not sure how I'm going wrong

"David Biddulph" wrote:

Not COUNTIF, but:
=SUMPRODUCT((A1:A10="NUTS")*(B1:B10="BOLTS"))
--
David Biddulph


"Andy K" wrote in message
...
Cells A1: A10 and B1:B10 have a list of components "NUTS" and "BOLTS" I
would like to use countif to total the number of times I see NUTS but only
if
bolts can be seen in the same row
A B
1 NUTS BOLTS 1
2 SCREWS BOLTS
3 NUTS WASHERS
4 NUTS WASHERS
5 SCREWS BOLTS
6 SCREWS WASHERS
7 SCREWS WASHERS
8 NUTS WASHERS
9 SCREWS WASHERS
10 NUTS BOLTS 1
Total 2

Thanks in advance




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default countif

What do you get from the formulae =A1="NUTS" and =B1="BOLTS" ?
Perhaps you have extra spaces (or other non-printing characters) in the
cells (although your example didn't have)?
What do you get from the formulae =LEN(A1) and =LEN(B1) ?
--
David Biddulph

"Andy K" wrote in message
...
Result showing 0 not sure how I'm going wrong

"David Biddulph" wrote:

Not COUNTIF, but:
=SUMPRODUCT((A1:A10="NUTS")*(B1:B10="BOLTS"))
--
David Biddulph


"Andy K" wrote in message
...
Cells A1: A10 and B1:B10 have a list of components "NUTS" and "BOLTS"
I
would like to use countif to total the number of times I see NUTS but
only
if
bolts can be seen in the same row
A B
1 NUTS BOLTS 1
2 SCREWS BOLTS
3 NUTS WASHERS
4 NUTS WASHERS
5 SCREWS BOLTS
6 SCREWS WASHERS
7 SCREWS WASHERS
8 NUTS WASHERS
9 SCREWS WASHERS
10 NUTS BOLTS 1
Total 2

Thanks in advance






  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default countif

You are welcome! Thanks for the feedback!
Stefi

€žAndy K€ť ezt Ă*rta:

Thanks this is Just what I'm looking for

"Stefi" wrote:

=SUMPRODUCT(--(A2:A11="NUTS"),--(B2:B11="BOLTS"))
Regards,
Stefi

€žAndy K€ť ezt Ă*rta:

Cells A1: A10 and B1:B10 have a list of components "NUTS" and "BOLTS" I
would like to use countif to total the number of times I see NUTS but only if
bolts can be seen in the same row
A B
1 NUTS BOLTS 1
2 SCREWS BOLTS
3 NUTS WASHERS
4 NUTS WASHERS
5 SCREWS BOLTS
6 SCREWS WASHERS
7 SCREWS WASHERS
8 NUTS WASHERS
9 SCREWS WASHERS
10 NUTS BOLTS 1
Total 2

Thanks in advance

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
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF help Ant Excel Worksheet Functions 4 August 10th 05 09:02 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


All times are GMT +1. The time now is 05:28 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"