View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
excelent excelent is offline
external usenet poster
 
Posts: 695
Default how do i count how many times x in column a = 1 or 2 in column b

=SUM((A1:A100=1)*(B1:B100=5)) hit ctrl+shift+enter
=SUM((A1:A100=2)*(B1:B100=5)) hit ctrl+shift+enter



"Tony the Bajan" skrev:

In column A, I have the numbers 1 - 6 recurring many times. In column B, I
have different prices for 1-6 eg, $5, $6, $7 and there are multiple
occurences where 1 =$5, $6 etc
What function do I type into a cell in column C to count how many times 1 =
$5, 1 = $6, 2 = $5, 2 = $6 etc.

I have tried =countif(a1:a100=1,b1:b100=$5) no good.
=if(and(a1:a100=1,b1:b100=$5) no good either. Seems so simple. Help

Thanks