Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default count if condition in two columns

I have tab which lists employees in col A10:A110. I need formula to count
from another list the occurances of emp X in a list on another tab where the
second col is "y"

I could not get countif(and(sheet2!C10:C500,=A10),(sheet2!D10:D500 ,"y")) to
work but I think you see what I am trying for. I want to copy this formula
down Col b for all 100 employees. Using Dcount I don't think is appropriate
cause I don't want to set up 100+ criteria ranges. I need the criteria in
the formula.

Hope this is clear.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default count if condition in two columns

'missed the equal sign

=sumproduct((sheet2!C10:C500=A10)*(sheet2!D10:D500 ="y"))

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


"Don Guillett" wrote:

try
=sumproduct((sheet2!C10:C500=A10)*(sheet2!D10:D500 "y"))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MusicMan" wrote in message
...
I have tab which lists employees in col A10:A110. I need formula to count
from another list the occurances of emp X in a list on another tab where
the
second col is "y"

I could not get countif(and(sheet2!C10:C500,=A10),(sheet2!D10:D500 ,"y"))
to
work but I think you see what I am trying for. I want to copy this
formula
down Col b for all 100 employees. Using Dcount I don't think is
appropriate
cause I don't want to set up 100+ criteria ranges. I need the criteria in
the formula.

Hope this is clear.


.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default count if condition in two columns

When you have multiple criteria use SUMPRODUCT()

=SUMPRODUCT((A1:A10=criteria1)*(B1:B10=criteria2))
=SUMPRODUCT((A1:A10=F1)*(B1:B10=F2))

=SUMPRODUCT((A1:A10=criteria1)*(B1:B10=criteria2)* (C1:C10=criteria3))
'Wtih cells F1,F2,F3 holding the criteria
=SUMPRODUCT((A1:A10=F1)*(B1:B10=F2)*(C1:C10=F3))

If you are using Excel 2007 check out help on COUNTIFS()

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


"MusicMan" wrote:

I have tab which lists employees in col A10:A110. I need formula to count
from another list the occurances of emp X in a list on another tab where the
second col is "y"

I could not get countif(and(sheet2!C10:C500,=A10),(sheet2!D10:D500 ,"y")) to
work but I think you see what I am trying for. I want to copy this formula
down Col b for all 100 employees. Using Dcount I don't think is appropriate
cause I don't want to set up 100+ criteria ranges. I need the criteria in
the formula.

Hope this is clear.



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 A CORRESPONDING CELL IF A CONDITION IS MET Sandizet Excel Worksheet Functions 4 November 4th 08 09:47 AM
Count after given condition is met Antonio Excel Discussion (Misc queries) 7 May 15th 08 07:43 PM
Count Numeric Value with condition Tendresse Excel Discussion (Misc queries) 5 March 13th 08 02:33 AM
How to count array with OR condition Jimbo213 Excel Worksheet Functions 4 February 1st 08 04:10 AM
count col-A if col-B = condition Balhar Excel Worksheet Functions 8 January 18th 06 09:52 PM


All times are GMT +1. The time now is 12:05 PM.

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

About Us

"It's about Microsoft Excel"