#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
serve
 
Posts: n/a
Default Need a count

A B
1 Ford June
2 Ford May
3 BMW June
4 Ford June
5 Ford June
I need to COUNT how many "Fords" have the value of June - the answer should
be 3 in this sample. I tried sumif, countif, sumproduct, maybe I need a
combination?
Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
renegan
 
Posts: n/a
Default Need a count


You can use a support column C with this formula:
=IF(AND(A1="Ford",B1="June"),1,0)
Apply this all the rows and get the total of column C.


--
renegan
------------------------------------------------------------------------
renegan's Profile: http://www.excelforum.com/member.php...o&userid=10450
View this thread: http://www.excelforum.com/showthread...hreadid=535124

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Need a count

Hi!

Try this:

=SUMPRODUCT(--(A1:A5="Ford"),--(B1:B5="June"))

Biff

"serve" wrote in message
...
A B
1 Ford June
2 Ford May
3 BMW June
4 Ford June
5 Ford June
I need to COUNT how many "Fords" have the value of June - the answer
should
be 3 in this sample. I tried sumif, countif, sumproduct, maybe I need a
combination?
Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj
 
Posts: n/a
Default Need a count

sum product should work
= sumproduct(--(A1:A5="Ford"),--(B1:B5="June"))
if there is a chance there are leading or trailing spaces try
= sumproduct(--(trim(A1:A5)="Ford"),--(trim(B1:B5)="June"))

"serve" wrote:

A B
1 Ford June
2 Ford May
3 BMW June
4 Ford June
5 Ford June
I need to COUNT how many "Fords" have the value of June - the answer should
be 3 in this sample. I tried sumif, countif, sumproduct, maybe I need a
combination?
Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default Need a count

Hi,

You may also want to try using an array formula although sumproduct is
definitely a better solution

=sum(if(($A$1:$A$5="Ford")*($B$1:$B$5="June"),1,0) )

confirmed by a Ctrl+Shift+Enter

Regards,

Ashish Mathur

"serve" wrote:

A B
1 Ford June
2 Ford May
3 BMW June
4 Ford June
5 Ford June
I need to COUNT how many "Fords" have the value of June - the answer should
be 3 in this sample. I tried sumif, countif, sumproduct, maybe I need a
combination?
Thanks.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Need a count

=sum(if(($A$1:$A$5="Ford")*($B$1:$B$5="June"),1,0) )
confirmed by a Ctrl+Shift+Enter


No need for the IF function:

=SUM(($A$1:$A$5="Ford")*($B$1:$B$5="June"))

Biff

"Ashish Mathur" wrote in message
...
Hi,

You may also want to try using an array formula although sumproduct is
definitely a better solution

=sum(if(($A$1:$A$5="Ford")*($B$1:$B$5="June"),1,0) )

confirmed by a Ctrl+Shift+Enter

Regards,

Ashish Mathur

"serve" wrote:

A B
1 Ford June
2 Ford May
3 BMW June
4 Ford June
5 Ford June
I need to COUNT how many "Fords" have the value of June - the answer
should
be 3 in this sample. I tried sumif, countif, sumproduct, maybe I need a
combination?
Thanks.



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
serve
 
Posts: n/a
Default Need a count

Thank you everybody. They all work.

"Biff" wrote:

=sum(if(($A$1:$A$5="Ford")*($B$1:$B$5="June"),1,0) )
confirmed by a Ctrl+Shift+Enter


No need for the IF function:

=SUM(($A$1:$A$5="Ford")*($B$1:$B$5="June"))

Biff

"Ashish Mathur" wrote in message
...
Hi,

You may also want to try using an array formula although sumproduct is
definitely a better solution

=sum(if(($A$1:$A$5="Ford")*($B$1:$B$5="June"),1,0) )

confirmed by a Ctrl+Shift+Enter

Regards,

Ashish Mathur

"serve" wrote:

A B
1 Ford June
2 Ford May
3 BMW June
4 Ford June
5 Ford June
I need to COUNT how many "Fords" have the value of June - the answer
should
be 3 in this sample. I tried sumif, countif, sumproduct, maybe I need a
combination?
Thanks.




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 Intervals of 2 Consecutive Values in same Row and Return Count across Row Sam via OfficeKB.com Excel Worksheet Functions 6 November 29th 05 03:27 PM
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 8 May 18th 05 04:23 AM
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 0 May 15th 05 08:14 PM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 01:37 AM


All times are GMT +1. The time now is 12:35 AM.

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"