Using multiple criterie in one column to sum another column

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to add data in column A by criteria from column B. Both columns
contain numbers and I want two criteria from column B (I think). I Basically
what I want is to say that if the numbers in column B are between 4 and 10
(including 10 and not 4) I want the sum of the corresponding numbers in
column A. Is this making sense? So if column A had 2,2,2,4,6,3,1,7,3,2 and
column B had 12,4,2,6,10,3,5,17,9,4 I would want the result to be 14. I have
tried many variations of sum.if and sumproduct and so on and nothing seems to
work. I either get an error message saying that there is a flaw in the
formula (it doesn't like the "," I use to separate things with and so on) or
I get a return of "0". Can anyone tell me what I am supposed to do?
 
Cool. Thank you. I also managed to get it to work using :

{=SUM(HVIS(B1:B10>=5;HVIS(B1:B10<=10;A1:A10;0);0))}

Your way is easier though ;-)

This is in Danish so HVIS is IF. Otherwise I think it's written the same way.

"excelent" skrev:
 
Ja det har jeg jo nok hvilket gør det besværligt at spørge på engelsk da ting
ikke hedder det samme. Jeg startede nemlig med guiden til betinget sum
(tilføjelsesprogrammet), men den sagde bare run time error 1004 Kan ikke
angive egenskaben FormulaArray for klassen Range. Jeg tror det er fordi jeg
har for meget data. Det var med guiden jeg fandt matrix formelen ved at lave
en lille tabel med data til at bruge guiden på. :)

"excelent" skrev:
 
Back
Top