View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Count and Sum of cells if conditions fulfilled

One way:

=COUNTIF(A1:A100, "Yes")

=SUMIF(A1:A100, "Yes", B1:B100)

In article ,
Bono wrote:

Hi all,

Trying to count or sum values from a range, if a condition is respected:
A B
Yes 25
No 12
Yes 11

So, I would like in cells being able to:
- count cells if cell A is Yes (expecting then: count = 2, as A1 and A3 are
yes, so B1 and C1 are counted)
- sum cells if cell A is Yes (expecting then: sum= 36, as A1 and A3 are yes,
so B1=25 + C1=11 are summed=36)

Hope it's clear enough... thanks for help!