#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 62
Default CountIF or SumIF

I need a formula that will first look in column A for a name, then look in
column b and count how many times a certain value appears for that name.
ColumnA Column B
Scott Agree
John Agree
Scott Agree
How many times does scott have a agree?
Answer:
2
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default CountIF or SumIF

Try this:

=SUMPRODUCT(--(A1:A10="Scott"),--(B1:B10="Agree"))

Better to use cells to hold the criteria:

C1 = Scott
D1 = Agree

=SUMPRODUCT(--(A1:A10=C1),--(B1:B10=D1))

Note: you can't use entire columns as range references - A:A, B:B (unless
you're using Excel 2007)

Biff

"Scott@CW" wrote in message
...
I need a formula that will first look in column A for a name, then look in
column b and count how many times a certain value appears for that name.
ColumnA Column B
Scott Agree
John Agree
Scott Agree
How many times does scott have a agree?
Answer:
2



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 62
Default CountIF or SumIF

This worked great. How would I add a third variable? I would like to input a
month to search by as well.

"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(A1:A10="Scott"),--(B1:B10="Agree"))

Better to use cells to hold the criteria:

C1 = Scott
D1 = Agree

=SUMPRODUCT(--(A1:A10=C1),--(B1:B10=D1))

Note: you can't use entire columns as range references - A:A, B:B (unless
you're using Excel 2007)

Biff

"Scott@CW" wrote in message
...
I need a formula that will first look in column A for a name, then look in
column b and count how many times a certain value appears for that name.
ColumnA Column B
Scott Agree
John Agree
Scott Agree
How many times does scott have a agree?
Answer:
2




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 422
Default CountIF or SumIF

Try:
=SUMPRODUCT(--(A1:A10="Scott"),--(B1:B10="Agree"),--(MONTH(C1:C10)=10))

Where you want October (Month = 10)


"Scott@CW" wrote in message
:

This worked great. How would I add a third variable? I would like to input a
month to search by as well.

"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(A1:A10="Scott"),--(B1:B10="Agree"))

Better to use cells to hold the criteria:

C1 = Scott
D1 = Agree

=SUMPRODUCT(--(A1:A10=C1),--(B1:B10=D1))

Note: you can't use entire columns as range references - A:A, B:B (unless
you're using Excel 2007)

Biff

"Scott@CW" wrote in message
...
I need a formula that will first look in column A for a name, then look in
column b and count how many times a certain value appears for that name.
ColumnA Column B
Scott Agree
John Agree
Scott Agree
How many times does scott have a agree?
Answer:
2





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
Forget SUMIF, COUNTIF and VLOOKUP Pierre Leclerc Excel Worksheet Functions 16 April 27th 23 11:51 AM
How do I set up a countif, or sumif that is multiconditional? Mr. Yanni Excel Worksheet Functions 9 June 21st 06 09:17 AM
problems with sumif and countif Simon Shaw Excel Discussion (Misc queries) 6 July 23rd 05 10:02 PM
Modify SUMIF and COUNTIF to work with SUBTOTALS SSHO_99 Excel Worksheet Functions 2 November 12th 04 11:36 PM
Countif, Sumif, If - help! Angel160 Excel Worksheet Functions 2 November 3rd 04 05:23 PM


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