View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gerryR gerryR is offline
external usenet poster
 
Posts: 2
Default adding value only if criteria is true

Hi all. I've 2 columns (see below)

1 20
3 35
2 10
5 20
4 25
2 30
1 30


I need to get the total for each number on the lefts corrosponding value on
the right.

ie. Total of 1=50
2=40
etc

I tried

=IF(D15:D21="1", SUM(F15:F21))

but no joy, can anyone shed some light?
thanks and regards
gR