![]() |
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. |
count if condition in two columns
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. |
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. |
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. . |
All times are GMT +1. The time now is 06:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com