View Single Post
  #2  
Old 14th November 2002, 03:27 PM
becareful becareful is offline
Member
 
Join Date: Jan 1970
Location: Canberra
Posts: 730
Default

Deejay,

I think the following will do what you want.

For first example (sum of column E when value in B is 4, C is 2 and D is 3).
I would add an extra 2 columns (I will assume F and G). In Column F of the first row of your data (ie cell F3) put in the following forumula:
=IF(B3=4,IF(C3=2,IF(D3=3,1,0),0),0)
This will give you a value of 1 in column F if the three values are as specified or 0 if they are not. Copy this forumla down the whole column. Now in cell G3 put in the formula:
=E3*F3
Again copy this down the whole of column G. This will give you the value of column E only if the criteria are as specified, otherwise it will give a 0.

Now simply sum columns F and G. Column F will give you the count of the number of matches and column G will be the sum you are after.

Hope this helps - if you want me to email you an example post your email address and I will send it to you (or send me an email at the tipping competition address.


"Becareful"
__________________
"Computers can do that????" - Homer Simpson
Reply With Quote